Jump to content

load page or not


Gatsu
 Share

Recommended Posts

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

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...