Codes here !
Moderators: macek, egami, gesf
- New php-forum User
- Posts: 50
- Joined: Fri Jan 20, 2012 8:00 am
i dont think it will be causing your problem but you dont need
will get the job done!
there are a few things i would try to resolve this issue firstly put your table and field names inside ` `
Code: Select all
$sql="SELECT * FROM `user` WHERE `LoginName`='$myusername' AND `Password`='$mypassword'";
and if all else fails extract your query from phpmyadmin and then just add your php variables to that. the amount of times ive not been able to work out what was wrong with my query and ive extracted it and still not been able to tell the difference but its worked anyway!
- php-forum Active User
- Posts: 359
- Joined: Tue Feb 22, 2011 8:19 am
- Location: Canada
The first thing to do is echo back your query and put that into phpmyadmin to see if it runs. Usually that will give you the error, if it isn't obvious just from looking at the echoed query.
Also, you should switch from using mysql to mysqli/PDO as mysql is not secure.
- php-forum Fan User
- Posts: 589
- Joined: Fri Aug 05, 2011 9:53 am
The error your getting is quite specific - the table doesn't exist. Have a look at your database and check that the there is in fact a table called 'user' in the schema you've specified.
Who is online
Users browsing this forum: No registered users and 1 guest