saving . . . saved Error while connecting to mysql database has been deleted. Error while connecting to mysql database has been hidden .
Error while connecting to mysql database
Title
Question
I get the following error messege while conneting to database:
"Fatal error<span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: medium;">: Uncaught Error: Call to undefined function mysql_connect() in C:\\xampp\\htdocs\\connect.php:3 Stack trace: #0 {main} thrown in </span>C:\\xampp\\htdocs\\connect.php<span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: medium;"> on line </span>3"
<font color="#000000" face="Calibri" size="3">I am using XAMPP version 7.1.9 on OS Windows 7 SP 1. </font>
<font color="#000000" face="Calibri" size="3">php version is as same as xampp version</font>

PHP-and-MySQL MySQL-Part-2 01-02 min 50-60 sec 30-09-17, 6:10 p.m. Kuldeep7649

Answers:

I used mysli_connect instead of mysql_connect.Now it is working
03-10-17, 12:26 p.m. Kuldeep7649


if ur using new version of php then it should give error like this u need to use mysqli instead of mysql function 

better u use the pdo object 
26-02-18, 11:05 a.m. kaushikpardhi5@gmail.com


$connect = new mysqli("localhost","root","") 
try this if you are using new version
31-05-20, 8:58 a.m. questdreamz@gmail.com


Log-in to answer to this question.