I created this table, using the variables from my script as fields. I'm guessing that's right. I'm guessing at the structure too. I hope it will work.
Table structure for table nuke_petition
#
CREATE TABLE nuke_petition (
pet_id int(10) NOT NULL auto_increment,
sender_name varchar(50) NOT NULL default '',
sender_email varchar(255) NOT NULL default '',
sender_loc varchar(50) NOT NULL default '',
message text NOT NULL,
PRIMARY KEY (post_id)
) TYPE=MyISAM;
I need to figure out how to put the form data into that table via script. Would it look like this?
sql_query("INSERT INTO ".$prefix."_petition (sender_name, sender_email, sender_loc, message) VALUES ('$sender_name', '$sender_email', '$sender_loc', '$message')", $dbi);
Tried that, didn't get any errors, but the data didn't get put into the table.
This has one more field, pet_id, than the data that went to the text file. How do I handle that? Perhaps that id field is not required?