Jump to content

Biax

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Biax's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello everyone, this is probably a totally lame question, but I've been developing my website that has a whole bunch of session variables for things like user log in and navigation. But if I browse away from the website and come back to it, it's still remembering values, and I don't want that! So how can I set it up so it destroys the session, ie, how do I know when the user has browsed off the website?
  2. Thanks, that cleared it up. :)
  3. Hello, I've been working on an "add download" form for my website, where I enter in information about a download, and then it adds it into a mySQL table. But there's something wrong with my mySQL syntax. My insertion line is: $sql = mysql_query("INSERT INTO downloads (catagory, title, url, desc, images, date) VALUES($mod_cat, $mod_name, $mod_url, $mod_desc, $mod_imgs, now())") or die (mysql_error()); And the error I get is: "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, images, date) VALUES(1, test, test, This is a test, http://www.test.com/bl' at line 1" I don't really have a good grasp of mySQL just yet, can anyone spot the incorrect syntax?
  4. Thank you very much! That wasnt written anywhere in any of the setup tutorials I was using. I had to enable some things in the ini and move a .dll. All working now. Thanks again.
  5. Here's the full code for it: <?php $conn = mysql_connect("$location","$username","$password"); if (!$conn) die("Could not connect MySQL"); mysql_select_db($database,$conn) or die("Could not open database"); echo 'database connected<br>'; ?> I dont get any of those output messages. If it was working, wouldnt it output "database connected"? I have this code included at the very start of a page. None of that page loads, it just gets to the $conn = mysql_connect("$location","$username","$password"); line and does no more after that.
  6. Hello, I've been setting up my own website, developing on my local machine. I've got PHP and Apache and all that working, and everything has been running smoothly until I started trying to do things with the database. I try to load the page and it does nothing; blank white page. I started commenting out lines to find where it happens, and its due to this line: $conn = mysql_connect("$location","$username","$password"); So it's having problems connecting to the database or something?? I don't know what to do, if anybody could help me I would greatly appreciate it.
×
×
  • 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.