Jump to content

eggy524

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

eggy524's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi, I'm creating a small shopping cart system with php and MySQL and need some help. I have a table in MySQL called 'order' with fields: OrderID int(10) - SET AS PRIMAY KEY AND TO AUTO-INCREMENT Username varchar(30) OrderDate Paid int(1) DIspatched int(1) I want to add a row to this table so in php I use this code: $current_date = date('Y-m-d'); $sql = "INSERT INTO order (Username, OrderDate) VALUES ('$username' , '$current_date')"; $result = mysql_query($sql); if(!$result) { die(mysql_error()); } else { echo 'OK'; } As far as i know, the fields below do not need to be inserted in my query because they have default values or otherwise: OrderID - should automatically increment Paid - Default value set to 1 Dispatched - Default value set to 0 The problem is that when i run this query I get the error message: 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 'order WHERE Username='test'' at line 1 I cant see anything wrong with this query, does anyone have any ideas? Thanks, adamport
  2. No, ftp will not work in my school and I am looking for a way to upload edit download files easily from the server using http, not ftp.
  3. Hi, I'm new to php and am looking for a good web file browser that can edit, view, rename, upload files or folders. I tried google and went though about 4 pages of them but none of them seemed to work - they all gave errors in the code, or partially displayed. Also, one would be nice not using global variables (i think thats what its called) because of their unsecurity. Anyway, any help would be great in trying to find one. thanks, eggy524 MOD EDIT: If you had a problem writing your own then this (PHP Help) would be the correct forum to post in, As it is, I'm moving it to "Miscellaneous" forum
×
×
  • 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.