okay some issues been a while since i wrote php or been on this site for that matter.
I am working on a login system for my users and my while clause is failing and the way the page is templated wont display an error if i put
PHP Code:
or die(mysql_error())
at the end of it here is the snippet
PHP Code:
$res = "SELECT * FROM users WHERE usrnm='". $usr ."'"; $subres = mysql_query($res) or die('FAIL1'); while($usrtst = mysql_fetch_array( $subres ) or die('FAIL2')) { if($pwd == !$usrtst['pwd']){ echo '<form method="post" action="/scripts/doLogin.php"> <div align="center" class="style69"> <p>Quick Login:<br /> Username<br /> <input name="username" type="text" id="username" /> <br /> <strong><font color="#FF0000">Password is Invalid </font></strong><br /> <input name="password" type="password" id="password" /> <br /> <input type="submit" name="Submit" value="Submit" /> <br /> <input name="remberme" type="checkbox" id="remberme" value="yes" /> Remember Me </p> </div> </form> '; }
though testing i found it was this line failing (notice or die('FAIL2')) yet this script works on my login processor so i dont know were i am going wrong, as this script is checking a cookie for a user name and password, check the username against the db, then validates if the pass is correct or not if it is then continues and if it fails then it redisplays the form with bold red font face to indicate a bad password in the cookie (ie someone spoofed or tampered it)
hope that helps with details thanks in advance for the help
__________________
AMW_Drizz
Php 5.2 Mysql 4.1 IIS 6 Win2k3 Server && PHP 5.2 MySQL 4.1 Apache 2.2 (separate machine of course)
Last edited by amw_drizz : 09-23-2007 at 08:17 PM.
Reason: forgot something ;)
|