can you echo your query after it builds the query to see waht is being sent to MYSQL_QUERY..
so please put an echo $query; after it builds it and post that and also post ur table structure for the sports table...
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
phpCodeGenie builds the following query string from the form it generated ....
$query="insert into sports (desc,name,level,gender,onseason) VALUES ('$descField','$nameField','$levelField','$genderField','$onseasonField')";
The problem is, nothing was getting inserted into the database. But since there was no die(), it told me everything was ok.
So I added the die, and now I have this;
$result = MYSQL_QUERY($query) or die("Invalid query: " . mysql_error());
And that produces this....
Invalid query: You have an error in your SQL syntax near 'desc,name,level,gender,onseason) VALUES ('Girls Baseball','Baseball','Varsity','' at line 1
What the heck? I see nothing wrong. Yet I can go in with phpMyAdmin and add records all day long.
Help!!!! :)
Brett
can you echo your query after it builds the query to see waht is being sent to MYSQL_QUERY..
so please put an echo $query; after it builds it and post that and also post ur table structure for the sports table...