I don't see a programming forum so i'll just post it here.
General problem i am having is that PHP isn't writing to the database. It can read from the database but it cannot write to it. I am not getting any errors and i checked the MySQL log and nothing there. I can't find any php log file.
Here is the copy/paste of my code:
mysql_pconnect(&host,&user,&pw)
or die("Unable to connect to MySQL server - LINE: 71 =- " . mysql_error());
mysql_select_db("guestbook")
or die("Unable to select database - LINE: 72 =- " . mysql_error());
$query = "INSERT INTO guests (guest_id, guest_name, guest_email, guest_time, guest_message) VALUES(0000, '$name','$email',NULL,'$message')";
mysql_query($query) or die("Insert Failed!" . mysql_error());
// end code
I tried that exact query in the SQL prompt and it works using the same user name.
I am lost as to why it doesn't work. Any Suggestions?
Thanks!
<A HREF="http://www.anandtech.com/mysystemrig.html?id=9933" target="_new"> My Rig </A>
General problem i am having is that PHP isn't writing to the database. It can read from the database but it cannot write to it. I am not getting any errors and i checked the MySQL log and nothing there. I can't find any php log file.
Here is the copy/paste of my code:
mysql_pconnect(&host,&user,&pw)
or die("Unable to connect to MySQL server - LINE: 71 =- " . mysql_error());
mysql_select_db("guestbook")
or die("Unable to select database - LINE: 72 =- " . mysql_error());
$query = "INSERT INTO guests (guest_id, guest_name, guest_email, guest_time, guest_message) VALUES(0000, '$name','$email',NULL,'$message')";
mysql_query($query) or die("Insert Failed!" . mysql_error());
// end code
I tried that exact query in the SQL prompt and it works using the same user name.
I am lost as to why it doesn't work. Any Suggestions?
Thanks!
<A HREF="http://www.anandtech.com/mysystemrig.html?id=9933" target="_new"> My Rig </A>
