Gatsu Posted July 9, 2008 Share Posted July 9, 2008 I was wondering if there is any way to prevent the page from loading or something, like this if(($pa==$_GET['pass'])) {---CONTINEU LOADING PAGE---}elseecho "Wrong password..." Link to comment Share on other sites More sharing options...
Synook Posted July 9, 2008 Share Posted July 9, 2008 if(!($pa==$_GET['pass'])) die("Wrong password..."); But in the end I would suggest you implement softer validation so that it, say, brings the client back to the login form. Link to comment Share on other sites More sharing options...
Gatsu Posted July 9, 2008 Author Share Posted July 9, 2008 How come I always get to the "Wrong password..." when I use this code?the form is name="pass2" $pa = mysql_query("SELECT pass FROM annons WHERE id=".$_GET['id']."");$ap = $_REQUEST['pass2'];if(!($pa==$ap)) die("Wrong password..."); Link to comment Share on other sites More sharing options...
Synook Posted July 9, 2008 Share Posted July 9, 2008 Because $pa is a MySQL resource, not a string. You have to extract the string somehow, e.g. $pa = implode(mysql_fetch_assoc(mysql_query("SELECT pass FROM annons WHERE id=".$_GET['id'].""))); Link to comment Share on other sites More sharing options...
Gatsu Posted July 9, 2008 Author Share Posted July 9, 2008 aaah thank you =) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.