Jump to content

unless a current record is in my table, none can be added ??


programguru

Recommended Posts

i created a simple script to populate a myslq table with php.

 

all is working perfectly fine, but when the table has 0 records, i cannot ad any records through my php script (although the script processes with no errors?) - which works perfectly fine when there is at least 1 record in the table.

 

anyone know why this would happen and how to fix it? my googles searches and php.net searches yielded nothing thus far.

 

here is my mysql:

$sql = "INSERT INTO $table_name (id, date, title, description, image) VALUES ('', '$_POST[date]', '$_POST[title]', '$_POST[description]', '$_POST[image]')";
?>

 

sos!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.