MrKaraokeSteve Posted July 22, 2007 Share Posted July 22, 2007 Hi, I am having issues with this script.. When a user registered on my site they are sent an email with the following: http://www.sitename.com/user_activate.php?ConfirmNumber=1234567890123456789 (20 digit random #) I am trying to do several differnt things with the script 1. check to make sure username and password are entered 2. check to make sure username and password are correct 3. check to make sure the "ConfirmNumber" matches the "ConfirmNumber" that is in the users db 4. check to make sure account is not already activated <?php include ('top.php'); if(isset($_POST['submit'])) { $user = $_POST['user']; $pass = base64_encode($_POST['pass']); if((!$_POST['user']) || (!$_POST['pass'])) { echo "Sorry you didnt enter an username or password, please got back and try again"; } else { $jap_data = mysql_query("SELECT pass, active, ConfirmNumber FROM users WHERE addicted_id='$user'") or die(mysql_error()); $jap_output = mysql_fetch_array($jap_data); if($pass != $jap_output['pass']) { echo "The password you entered was incorrect, please go back and try again"; } else { if($jap_output['active'] != 0) { echo "It appears that you have already confirmed your account!"; } else { if($ConfirmNumber != $jap_output['ConfirmNumber']) { echo "Check your username and make sure you are entering the correct username"; } else { $Venue_ID = $_GET['Venue_ID']; mysql_query("UPDATE users SET Active='1' WHERE ConfirmNumber='$ConfirmNumber'") or die(mysql_error()); echo 'Your Account has been confirmed!'; } } } } } else { ?> <p><center>Please enter your username and password that you just signed up for to confirm your account </center></p> <form action="user_activate.php?ConfirmNumber=<?php echo $_GET['ConfirmNumber']; ?>" method="POST"> <table cellpadding="2" cellspacing="2" width="69%" style="font-size: 12px; "> <tr> <td colspan="3" class="h"><div align="center"><strong>Username and Password </strong></div></td> </tr> <tr> <td class="h"><a href="" onMouseOver="return escape(' This is the hint ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td class="h"><div align="left">UserName</div></td> <td><input name="user" type="text" /></td> </tr> <tr> <td class="h"><a href="" onMouseOver="return escape(' This is the hint ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td class="h"><div align="left">Password</div></td> <td><input name="pass" type="password" /></td> </tr> <tr> <td> </td> <td><center><input type="submit" name="submit" value="Confirm"> </center></td> <td> </td> </tr> </table> </form> <?php } include("bottom.php"); ?> Quote Link to comment Share on other sites More sharing options...
MrKaraokeSteve Posted July 22, 2007 Author Share Posted July 22, 2007 I am still needing help! Thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.