koo_04 Posted November 30, 2009 Share Posted November 30, 2009 When I try to run the PHP page I get Fatal error: Call to undefined function mysql_connect() in C:\websites\Forum\connect.php on line 2 This is the code <?php $db = mysql_connect("localhost", "root", "Password") or die("Could not connect."); if(!$db) die("no db"); if(!mysql_select_db("database_password",$db)) die("No database selected."); if(!get_magic_quotes_gpc()) { $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } else { $_GET = array_map('stripslashes', $_GET); $_POST = array_map('stripslashes', $_POST); $_COOKIE = array_map('stripslashes', $_COOKIE); $_GET = array_map('mysql_real_escape_string', $_GET); $_POST = array_map('mysql_real_escape_string', $_POST); $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE); } ?> Quote Link to comment Share on other sites More sharing options...
Alex Posted November 30, 2009 Share Posted November 30, 2009 See here. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.