Jump to content

Shaun13

Members
  • Posts

    61
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Shaun13's Achievements

Member

Member (2/5)

0

Reputation

  1. Finally! It works. Many thanks to lemmin and janker. ~Shaun
  2. Ok, now its inputing the literally "$id" into the database. How do I fix it?
  3. No, thats what I inputed as $link_name. Sorry, should have explained that.
  4. Ok, so I am having some user-inputed data inserted into the table "nav_links" and it outputs this error: Unknown column 'h' in 'field list' I have got the area down to this piece of code. elseif($_GET['do'] == 'add_link') { $id = $_GET['cat']; if($_GET['go']=='true') { $link_name = $_POST['link_name']; $url = $_POST['url']; if(empty($link_name)) { $error_txt = 'Enter a link title.'; } elseif(empty($url)) { $error_txt = 'Enter a URL.'; } else { $max = mysql_query('SELECT MAX(id) FROM nav_links'); $max_array = mysql_fetch_array($max); $max_id = $max_array['MAX(id)'] +1; $query = mysql_query('INSERT INTO `nav_links` (`id` ,`cat_id` ,`url` ,`name`) VALUES ('.$max_id.', '.$id.', '.$url.', '.$link_name.')'); if($query) { $error_txt = 'Link Added Successfully.'; } else { $error_txt = mysql_error(); } } } Any help? Thanks in advance, ~Shaun
  5. I need a register form, but what I want it to do is if you don't fill something in, or there is an error, I want words to appear above the input box saying for example "You Didn't Enter A Username!". Any help is appreciated. ~Shaun
  6. Thanks a ton, it worked! ~Shaun
  7. I am creating an install script for people to use my software. Heres the problem: Here is the part of the script we are lookign at: $file1 = fopen("mysql_info.php","w"); echo fwrite($file1," <?php // =========================== // whats my database info? // =========================== $host2=".$host1."; // Host name $username2=".$username1."; // Mysql username $password2=".$password1."; // Mysql password $db_name2=".$database1."; // Database name ?>"); fclose($file1); Ok, heres the problem. It is thinking that $host2, $username2, etc.. are variables I have set, and obviously on mysql_info.php, all I end up with is: <?php // =========================== // whats my database info? // =========================== =somehost; // Host name =someusername; // Mysql username =someonespassword; // Mysql password =someonesdatabasename; // Database name ?> Any Help? ~Shaun
  8. I would really appreciate some help. ~Shaun
  9. Ok, I have the new field, now what? ~Shaun
  10. So what am i putting for the options for the new last_activity field?
  11. Could you create the function for me? I don't know how.
  12. If they like closed the window, how would it log them out?
  13. Hi, I am creating a forum and I was wondering how I could create a users online legend at the bottom of the index. I tried something like echo "$myusername" and it will only display your username. How could I accomplish this? ~Shaun
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.