I have a membership site that automatically emails the member a verificaton link, I signed up myself to see how it worked and got this ERROR MESSAGE after clicking the verification link...
Need Simple PHP Help
6
I have a membership site that automatically emails the member a verificaton link, I signed up myself to see how it worked and got this ERROR MESSAGE after clicking the verification link...
My code for the validate.php file is below, if someone can point out the error in the code that would be great its not that long of string of code.....
-----------------
<?php
include "conn.php";
$vcode=$_GET[vcode];
$sql1 = "Select * from members where status='Verified'";
$rec1 = mysql_query($sql1,$db) or die (mysql_error());
$trows1 = mysql_numrows($rec1);
$sql = "Select * from members where vcode='$vcode'";
$rs = mysql_query($sql,$db) or die(mysql_error());
$tr=mysql_numrows($rs);
$datas = mysql_fetch_array($rs);
if($tr>0)
{
$sq = "UPDATE members SET status = 'Verified' , vcode='Done' WHERE vcode = '$vcode'";
mysql_query($sq) or dier(mysql_error());
$contents = "<font size='4'> Thank You! Your account is now confirmed... </font><br/><br/><p> <b>You can login now from the "Login" link located to your left under the Members drop down menu.</b>
<br>
";
}
else
{
$contents = "Sorry but we can't complete your request... There are some reason why: <p> <li>Incorrect verification URL </li><li>This account is already verified</li><li>Or This account was banned</li><p>
<br>
If you have questions please send email to webmaster@$domain
";
}
include "template.php";
?>
--------------
Thanks for any help...........
My code for the validate.php file is below, if someone can point out the error in the code that would be great its not that long of string of code.....
-----------------
<?php
include "conn.php";
$vcode=$_GET[vcode];
$sql1 = "Select * from members where status='Verified'";
$rec1 = mysql_query($sql1,$db) or die (mysql_error());
$trows1 = mysql_numrows($rec1);
$sql = "Select * from members where vcode='$vcode'";
$rs = mysql_query($sql,$db) or die(mysql_error());
$tr=mysql_numrows($rs);
$datas = mysql_fetch_array($rs);
if($tr>0)
{
$sq = "UPDATE members SET status = 'Verified' , vcode='Done' WHERE vcode = '$vcode'";
mysql_query($sq) or dier(mysql_error());
$contents = "<font size='4'> Thank You! Your account is now confirmed... </font><br/><br/><p> <b>You can login now from the "Login" link located to your left under the Members drop down menu.</b>
<br>
";
}
else
{
$contents = "Sorry but we can't complete your request... There are some reason why: <p> <li>Incorrect verification URL </li><li>This account is already verified</li><li>Or This account was banned</li><p>
<br>
If you have questions please send email to webmaster@$domain
";
}
include "template.php";
?>
--------------
Thanks for any help...........
- kuzmanin
- [1] reply
- Steve Wells
- [1] reply
Next Topics on Trending Feed
-
6