Forum Moderators: coopster
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
if (!isset($_GET['email'])){$email = '';}else{$email= $_GET['email'];} // email
if (!isset($_GET['password1'])){$password1 = '';}else{$password1= $_GET['password1'];} // password1
if (!isset($_GET['password2'])){$password2 = '';}else{$password2= $_GET['password2'];} // password2
mysql_connect ("localhost","root","");
$result = mysql_query ( "select * from 'emailvalidate'
where name = '$email','$password1','$password2' );
if ($result) {
if (mysql_num_rows ($result) > 0) {
print "It looks like youre already signed up with us! <br>\n";
$found = true;
}
}
if ($found == false) {
if ($result) {
print "<h1> Thank you! </h1>" ;
}
else {
print "Something went wrong? please contact us!";
}
}
mysql_close();
?>
</body>
</html>
mysql_connect ("localhost","root","");
$query = "select * from emailvalidate where name='$email' AND pass1='$password1' AND pass2='$password2'";//I don't know what is your db structure, so this is only an example
if($result = mysql_query($query)) {
if (mysql_num_rows ($result) > 0) {
print "It looks like you're already signed up with us! <br>\n";
$found = true;
}
Hope this helps
Michal Cibor
PS. Do you store redundant data in db (pass1, pass2)? You shouldn't! Check with php if they are the same.
Happy coding!