Hello,
I'm newbie in using MySQL and I have problem with inserting record into the database. Structure of database forum_db:
id int auto_increment
user varchar
time varchar
date varchar
text longtext
see my code:
Everytime I get "Record inserting error" and when I uncomment the die($query) statement, I get "INSERT INTO forum_db VALUES('','name','09:58:23','1. July 2003','some text')" which should be OK. Please help, I'm desperate after 2 hours of trying to solve this.
I'm newbie in using MySQL and I have problem with inserting record into the database. Structure of database forum_db:
id int auto_increment
user varchar
time varchar
date varchar
text longtext
see my code:
Code:
$query="INSERT INTO forum_db VALUES('','$nickname','$time','$date','$textfield')";
// die($query);
$result=mysql_query($query,$connection) or die("Record inserting error");
Everytime I get "Record inserting error" and when I uncomment the die($query) statement, I get "INSERT INTO forum_db VALUES('','name','09:58:23','1. July 2003','some text')" which should be OK. Please help, I'm desperate after 2 hours of trying to solve this.