- 1

I am unable to solve an error which I'm getting in my php project.

i saved my file in htdocs and given a proper database connection but still I'm not getting proper output.can anyone tell me that how to connect file with database?

23rd Jan 2017, 3:14 PM
Sumit Jha
Sumit Jha - avatar
9 Answers
+ 1
Please show code first then i will tel you better results how to connect etc....
24th Jan 2017, 7:49 AM
Shubham Surya
Shubham Surya - avatar
+ 1
Remove password and try with new db again
26th Jan 2017, 1:40 PM
Shubham Surya
Shubham Surya - avatar
0
hi I'm getting error only in the line in which i have given database connection and i.e $conn=mysql_connect("localhost","root","sumit@1234"); $db=mysql_select_db('students',$conn);
26th Jan 2017, 1:23 PM
Sumit Jha
Sumit Jha - avatar
0
$db=mysql_select_db("students");
26th Jan 2017, 1:32 PM
Shubham Surya
Shubham Surya - avatar
0
Try this and what kind error are show
26th Jan 2017, 1:32 PM
Shubham Surya
Shubham Surya - avatar
0
I'm getting this error:- Fatal error: Uncought Error: Call to undefined function mysql_connect() in c:\xampp\htdocs\user_registration.php:55 Stack trace: #0 {main} thrown in C:\xampp\htdocs\user_registarion.php on line 55
26th Jan 2017, 1:38 PM
Sumit Jha
Sumit Jha - avatar
0
Once remove your phpmyadmin password and connect with blank password
26th Jan 2017, 1:41 PM
Shubham Surya
Shubham Surya - avatar
0
Use "mysqli_connect" if you still face error
26th Jan 2017, 1:44 PM
Shubham Surya
Shubham Surya - avatar
0
$con = mysqli_connect("127.0.0.1","root","pass","your_database");
26th Jan 2017, 1:45 PM
Shubham Surya
Shubham Surya - avatar