Hello all,
New to PHP and trying to write code that would add a record into the database. I'm getting the error:
Fatal error: Call to undefined function: fatal_error() on line 78 (error at end of code)
Here are the major pieces of code:
$infoquery = "INSERT INTO speaker_info VALUES (";
if (!empty($result_array["name_prefix"])) {
$infoquery .= "'" . $result_array["name_prefix"] . "', ";
} else {
$infoquery .= "'Null', ";
}
if (!empty($result_array["name_first"])) {
$infoquery .= "'" . $result_array["name_first"] . "', ";
} else {
$infoquery .= "'Null', ";
}
...
if (!empty($result_array["fee"])) {
$infoquery .= "'" . $result_array["fee"] . "'";
} else {
$infoquery .= "'Null'";
}
$infoquery .= ")";
echo $infoquery;
(line 78) mysql_query ($infoquery) or fatal_error (mysql_error ());
Any help would be much appreciated!!!
Thanks, Martin