I am pretty new to PHP and am feeling my way around. I am having trouble doing a simple insert into my DB and am not sure what I am doing wrong.
Here is my code:
$connection = mysql_connect(DB_SERVER,DB_USER,DB_PASS);
if (!$connection) {
die("Database connection failed: " . mysql_error());
}
$db_select = mysql_select_db(DB_NAME,$connection);
if (!$db_select) {
die("Database selection failed: " . mysql_error());
}
$event_query = "INSERT INTO `test` (`id` ,'personal_info', 'event_creator')
VALUES ( '', $personal_info , $event_creator)";
I get the errors that personal_info and event_creator are not set even though they are set further up in the code.
Can anyone help?