Hi,
I was testing some pages I was writing on my own site and mysql database before moving it to the final site. They work fine on my site but now that I have moved it and transfer the sql over I am getting some errors.
PHP Code:
// Function for escaping and trimming form data.
function escape_data ($data) {
global $dbc; // Need the connection.
if (ini_get('magic_quotes_gpc')) {
$data = stripslashes($data);
}
return mysql_real_escape_string (trim ($data), $dbc);
} // End of function.
This function is in the page with all the database connection information, mysql_connect.php
I am getting this error when my page tries to add or update to the database.
Fatal error: Call to undefined function: mysql_real_escape_string() in /home/share/website.net/www.websitei.net/public_html/mysql_connect.php on line 41
Hopefully someone can tell me why this happens.