You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\School-Management-System-With-PHP-master\service\mysqlcon.php:7 Stack trace: #0 C:\xampp\htdocs\School-Management-System-With-PHP-master\service\check.access.php(2): include_once() #1 {main} thrown in C:\xampp\htdocs\School-Management-System-With-PHP-master\service\mysqlcon.php on line 7
The text was updated successfully, but these errors were encountered:
You have to update to mysqli like this:
$conn=mysqli_connect($db_host, $db_username, $db_password, $db_name);
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
exit();
}
And you need to change all mysql_ in the whoul project to mysqli_(lots of work):
You also should use this for example to get all students:
$sql = " SELECT * FROM students Where id='$yourId';"
Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\School-Management-System-With-PHP-master\service\mysqlcon.php:7 Stack trace: #0 C:\xampp\htdocs\School-Management-System-With-PHP-master\service\check.access.php(2): include_once() #1 {main} thrown in C:\xampp\htdocs\School-Management-System-With-PHP-master\service\mysqlcon.php on line 7
The text was updated successfully, but these errors were encountered: