Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to make a php registration and login form wiht msql database using myphpadmin, but somethings not right, i keep getting this error:


Fatal error: Uncaught Error: Call to undefined function mysql_select_db() in C:\xampp\htdocs\CC site\registration.php:10 Stack trace: #0 {main} thrown in C:\xampp\htdocs\CC site\registration.php on line 10
[^]

What I have tried:

ive tried alot of things messing aorund with the setting of the phpmyadmin username/passwords but something is wrong, maybe the coding is incorrect or maybe ive done something wrong i just would like a proffesional bit of help please :)


login.php https://prnt.sc/qzd48a[^]

registration.php https://prnt.sc/qzd4ll[^]

style.css https://prnt.sc/qzd534[^]

myphpadmin localhost https://prnt.sc/qzd5vh[^]
Posted
Updated 8-Feb-20 2:32am

1 solution

You may have a typo at line 10 of the registration.php file. Try
PHP
mysqli_select_db($con, 'usertable');
instead.

Since your table seems empty, you may get an empty result set, though.
 
Share this answer
 
Comments
Member 14738798 8-Feb-20 8:37am    
thank you i think its partly working as i am getting "Registration Successful" appear now...

i am getting one error still and my phpmyadmin is not recieving the account details i enter into the registration form?

https://prnt.sc/qzdi7f
MadMyche 8-Feb-20 10:02am    
Post your actual code into this question using the "Improve Question" widget, many people don't want to go off-site due to risks involved AND it is inconvenient.
phil.o 8-Feb-20 14:02pm    
The error message says "mysqli_query() requires at least 2 parameters".
Please check your syntax. And, more important, post your code inside your questions, there is everything to do it well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900