Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error #4

Open
Karla02 opened this issue Feb 19, 2018 · 3 comments
Open

Error #4

Karla02 opened this issue Feb 19, 2018 · 3 comments

Comments

@Karla02
Copy link

Karla02 commented Feb 19, 2018

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

@ekreddy
Copy link

ekreddy commented May 9, 2019

I am also getting same error .. Any help here ?

@hassam5
Copy link

hassam5 commented Feb 4, 2020

Same here

@Majidkadi
Copy link

Hi Every one,

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';"

$resulte = mysqli_query($conn, $sql);

while($row = mysqli_fetch_array($result))
{
echo "$row['id'];
echo "$row['name'];
echo "$row['email'];
...
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants