the form I made I initiated and log in form. the form uses a connect.php page which checks the user table to verify if the user is allowed access to the admin.php page. My problems is the two users I have in the user table are not able to gain access to the admin.php. I type in the user name and password but it tells me invalid log in as if the user doesn’t have privileges. is there something I’m not doing for the user to have privilege to access the admin area?
I realized I forgot to add the coding to show what I did.
The login.php is this.
[php]
[/php]
this is code should allow verification of the user name and password to be allowed into the admin area.
the is the connect.php
[php]
[/php]
Do I need to provide a user with privilege? I thought that once you added a user to the user database the first user was granted admin rights? I am still learning so I am sure I could be wrong on this.
First of all you need to post the error that mysql_error is returning from now on. Also, I just skimmed your code and noticed.
[php]’$username’ AND password and ‘$password’";[/php]
should be
[php]’$username’ AND password = ‘$password’";[/php]
Thanks spring, I didn’t notice that. I appreciate the fresh eyes.