| J.O. Aho 2005-03-01, 8:57 pm |
| Mike P wrote:
> I have the following code
> $gb_q ="Insert into guestbook
> ('Name','E_Mail','Seen_Perform','Perform
_Where','Find_Site','Where_From','Co
> mments')Values('$Name','$E_Mail','$Seen_
Perform','$Perform_Where','$Find_Sit
> e','$Where_From','$Comments')";
> echo "$gb_q";
> $result = mysql_query($gb_q);
>
> All of the variables come back from the form with no problems.
> I also have an auto_increment field that i am leaving out of the query.Its
> the first field(primary)
> This is not working.
> Any help would be appreciated
Do you get any error messages?
Add a space between ')' and 'Values'.
Have you selected the right database, so you aren't trying to insert into a
table that is missing?
If you have use unique for one of the columns and you are trying to insert a
new row with an already inserted row, then it will too fail.
Added alt.php.sql to the newsgroups as this is an sql question.
//Aho
|