Error: Call to undefined function mysql_connect()
Hi Guys,
Ive slowly been teaching myself html and have now moved on to php and mysql. For the last few hours ive been trying to connect to a database ive created however i keep getting the following
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\wamp64\www\Intranet\demo.php on line 6
Error: Call to undefined function mysql_connect() in C:\wamp64\www\Intranet\demo.php on line 6
the code im using is
<?php
$link = mysql_connect('localhost', 'root', '');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
Its driving me mad does anyone have any ideas? thanks in advance
Subject
Written By
Posted
Error: Call to undefined function mysql_connect()
September 05, 2016 10:30AM
September 05, 2016 11:39AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.