Hi and thanks for looking.

The code below is my signup page and it all goes fine until i have to compare the code i sent to their email address with the code they copy into a textbox. It works but only on when you submit the form and then ALSO refresh the page.

I have spent days on this and just can't see how to fix it. Any tips at all would be great. Sorry the code probably is the greatest, but i'm just starting out so I'll have time to fix it up.

BTW the site page can be viewed at http://www.thinksane.net/signup.php

Thanks again for looking


----------------------------------------------------------------------

<?php
	
	if ((isset($_POST[submitcheck])) && ( 
	(isset($_POST[regusername])) || ($_POST[regusername] != "") || 
	(isset($_POST[regpassword])) || ($_POST[regpassword] != "") || 
	(isset($_POST[regpasswordcheck])) || ($_POST[regpasswordcheck] != "") || 
	(isset($_POST[firstname])) || ($_POST[firstname] != "") || 
	(isset($_POST[surname])) || ($_POST[surname] != "") || 
	(isset($_POST[dob])) || ($_POST[dob] != "") || 
	(isset($_POST[country])) || ($_POST[country] != "") || 
	(isset($_POST[regemail])) || ($_POST[regemail] != "") || 
	(isset($_POST[agree])) || ($_POST[agree] != false) )) 
	{

		$regusername = $_POST[regusername];
		$regpassword = md5($_POST[regpassword]);
		$firstname = $_POST[firstname];
		$surname = $_POST[surname];
		$dob = $_POST[dob];
		$country = $_POST[country];
		$regemail = $_POST[regemail];
								
		setcookie("registration[username]", $regusername);
		setcookie("registration[password]", $regpassword);
		setcookie("registration[firstname]", $firstname);
		setcookie("registration[surname]", $surname);
		setcookie("registration[dob]", $dob);
		setcookie("registration[country]", $country);
		setcookie("registration[regemail]", $regemail);
		
		
		header('location:signup.php');
	}
		
	if ( (isset($_POST[activationsubmit])) ) {			
		setcookie("activationstatus", "code already sent");
	}		
		

include 'php_includes/header.php';
pagetitle(Signup);
?>
    
<div class="container">
    	
	<div class="content">
	 
	<?php
     if ((!isset($_COOKIE['registration'])) ){
    ?>
      
    <h3>Follow the steps below to signup and help promote rational thought. Replace this text with step by step image showing user at what stage they are at in the signup process.</h3>
    <form id="signup" name="signup" action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
    <input name="submitcheck" type="hidden" value="1" />
    <div>All information is required and must be entered. </div>
    
        <div id="signupinputs">
    <ol id="1">
		<li><input id="username" name="regusername" type="text" />
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regusername])) || ($_POST[regusername] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    <ol id="2">
        <li><input id="password" name="regpassword" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpassword])) || ($_POST[regpassword] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="3">
        <li><input id="passwordcheck" name="regpasswordcheck" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpasswordcheck])) || ($_POST[regpasswordcheck] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="4">
        <li><input id="firstname" name="firstname" type="text" /></li>
    </ol>
    <ol id="5">
        <li><input id="surname" name="surname" type="text" /></li>
    </ol>
    <ol id="6">
        <li><input id="dob" name="dob" type="text"/></li>
    </ol>
    <ol id="7">
        <li><input id="country" name="country" type="text"/></li>
    </ol>
    <ol id="8">
        <li><input id="regemail" name="regemail" type="text"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regemail])) || ($_POST[regemail] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    
    <ol>
    <li><?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[agree])) || ($_POST[agree] == false)) ) { 
		echo '//Error on TOS'; } 
	?></li>
    </ol>
    
    </div><!--Close signupinputs-->
    
    <div id="signuptext">
    <ol id="1">
    	<li><img src="images/1.png" /></li>
        <li>Username:</li>
    </ol>
    
    <ol id="2">
    	<li><img src="images/2.png" /></li>
        <li>Password: </li>
    </ol>
    
    <ol id="3">
    	<li><img src="images/3.png" /></li>
        <li>Retype Password: </li>
    </ol>
        
    <ol id="4">
    	<li><img src="images/4.png" /></li>
        <li>Firstname: </li>
    </ol>
    
    <ol id="5">
    	<li><img src="images/5.png" /></li>
        <li>Surname: </li>
    </ol>
    
    <ol id="6">
    	<li><img src="images/6.png" /></li>
        <li>D.O.B: </li>
    </ol>
    
    <ol id="7">
    	<li><img src="images/7.png" /></li>
        <li>Country: </li>
    </ol>
    
    <ol id="8">
    	<li><img src="images/8.png" /></li>
        <li>Email address: </li>
    </ol>    
    
    </div><!--Close signup text-->
    
    <ol id="9">
    	<li><img src="images/9.png" /></li>
        <li>I agree to the TOS:</li><input id="agree" name="agree" type="checkbox" /><li>
    </ol>    
    
    <ol id="9">
        <li><input type="image" src="images/tick.gif" id="login" name="login" /></li>
    </ol>
    </form>
		
    <?php
	}		
		
	if ( (isset($_COOKIE['registration'])) && (!isset($_COOKIE['activationstatus'])) && (!isset($_POST[activationsubmit])) ) {
		echo '<h1>first if statement</h1>';
		$activationcode = rand(100000, 1000000);
				
		$to = $_COOKIE[registration][regemail];
		$subject = "ThinkSane.net activation code, IMPORTANT!";
		$email = 'admin@thinksane.net';
		$message = 'Your activation code is ' . $activationcode . '. Copy this code and paste it into the textbox back on the registration page. 
					You will receive another confirmation email once you are fully signed up.';
		$headers = "From:" . $email;
		$sent = @mail($to,$subject,$message,$headers);
		
		if ($sent) {
		
					
			echo '<h3>An email has been sent to ' . $_COOKIE['registration']['regemail'] . ' with an activation code in it. <br />
					You must enter that code below before your account is created  </h3>';
		?>
            <form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        	<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            <input name="activationcode" type="hidden" value="<?php echo $activationcode ?>" />
            <input name="activationsubmit" type="submit" /></p>
        	</form>
		<?php	            
				}
		else{
			echo '<h2>The email could not be sent. You entered the address;' . $_COOKIE[registration][regemail] . '. Is that the right address?</h2>';
		}
	}
						
	if ( ($_COOKIE['activationstatus'] == 'code already sent') && ( $submittedactivationcode == $activationcode ) ) {
			
			
			$submittedactivationcode = $_POST[submittedactivationcode];
			$activationcode = $_POST[activationcode];
			
			if ( $submittedactivationcode == $activationcode ) {
			
			echo '<h2>Two codes are the same, creating and running SQL</h2>';

				/*$sql = "";
				$result = @mysql_query($sql) or die(mysql_error());*/
				
			}
			else{
				echo '<h2>The codes do not match, please check the code sent and try again.</h2>';
				?>
            	<form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        		<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            	<input name="activationsubmit" type="submit" /></p>
        		</form>
				<?php	    
			}
	}
		
	/*else{
		echo "<p>There was a problem sending the activation code. Please make sure you supplied the right email address.</p>";
		}*/	
	
		 
		?>
    
    
	</div><!--Close content div tag-->

</div><!--Close container div tag-->

<div class="footer">
<?php 
include 'php_includes/footer.php';
?>
</div>

</body>
</html>

You have $_POST variables such as this:

$_POST[activationsubmit]

They must be like this:

$_POST['activationsubmit']

Fix those first and see what happens.


Matti Ressler
Suomedia

Suomedia,

thanks for getting back. OK I have enclosed all POSTs in quotation marks. The full code is below just to make sure i don't do anything stupid.

Unfortunately it doesn't seem to have helped. The else statement at the end of the code is still just getting executed after the activation code has been entered.

again here is the code and i am also uploading it to thinksane.net/signup.php

-------------------------------------------------------------------------------------------

<?php
	
	if ((isset($_POST['submitcheck'])) && ( 
	(isset($_POST['regusername'])) || ($_POST['regusername'] != "") || 
	(isset($_POST['regpassword'])) || ($_POST['regpassword'] != "") || 
	(isset($_POST['regpasswordcheck'])) || ($_POST['regpasswordcheck'] != "") || 
	(isset($_POST['firstname'])) || ($_POST['firstname'] != "") || 
	(isset($_POST['surname'])) || ($_POST['surname'] != "") || 
	(isset($_POST['dob'])) || ($_POST['dob'] != "") || 
	(isset($_POST['country'])) || ($_POST['country'] != "") || 
	(isset($_POST['regemail'])) || ($_POST['regemail'] != "") || 
	(isset($_POST['agree'])) || ($_POST['agree'] != false) )) 
	{

		$regusername = $_POST['regusername'];
		$regpassword = md5($_POST['regpassword']);
		$firstname = $_POST['firstname'];
		$surname = $_POST['surname'];
		$dob = $_POST['dob'];
		$country = $_POST['country'];
		$regemail = $_POST['regemail'];
								
		setcookie("registration[username]", $regusername);
		setcookie("registration[password]", $regpassword);
		setcookie("registration[firstname]", $firstname);
		setcookie("registration[surname]", $surname);
		setcookie("registration[dob]", $dob);
		setcookie("registration[country]", $country);
		setcookie("registration[regemail]", $regemail);
		
		
		header('location:signup.php');
	}
		
	if ( (isset($_POST['activationsubmit'])) ) {			
		setcookie("activationstatus", "code already sent");
		
		setcookie("registration[username]","" , time()-3600);
		setcookie("registration[password]","" , time()-3600);
		setcookie("registration[firstname]","" , time()-3600);
		setcookie("registration[surname]","" , time()-3600);
		setcookie("registration[dob]","" , time()-3600);
		setcookie("registration[country]","" , time()-3600);
		setcookie("registration[regemail]","" , time()-3600);
	}		
		

include 'php_includes/header.php';
pagetitle(Signup);
?>
    
<div class="container">
    	
	<div class="content">
	 
	<?php
     if ((!isset($_COOKIE['registration'])) ){
    ?>
      
    <h3>Follow the steps below to signup and help promote rational thought. Replace this text with step by step image showing user at what stage they are at in the signup process.</h3>
    <form id="signup" name="signup" action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
    <input name="submitcheck" type="hidden" value="1" />
    <div>All information is required and must be entered. </div>
    
        <div id="signupinputs">
    <ol id="1">
		<li><input id="username" name="regusername" type="text" />
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regusername])) || ($_POST[regusername] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    <ol id="2">
        <li><input id="password" name="regpassword" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpassword])) || ($_POST[regpassword] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="3">
        <li><input id="passwordcheck" name="regpasswordcheck" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpasswordcheck])) || ($_POST[regpasswordcheck] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="4">
        <li><input id="firstname" name="firstname" type="text" /></li>
    </ol>
    <ol id="5">
        <li><input id="surname" name="surname" type="text" /></li>
    </ol>
    <ol id="6">
        <li><input id="dob" name="dob" type="text"/></li>
    </ol>
    <ol id="7">
        <li><input id="country" name="country" type="text"/></li>
    </ol>
    <ol id="8">
        <li><input id="regemail" name="regemail" type="text"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regemail])) || ($_POST[regemail] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    
    <ol>
    <li><?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[agree])) || ($_POST[agree] == false)) ) { 
		echo '//Error on TOS'; } 
	?></li>
    </ol>
    
    </div><!--Close signupinputs-->
    
    <div id="signuptext">
    <ol id="1">
    	<li><img src="images/1.png" /></li>
        <li>Username:</li>
    </ol>
    
    <ol id="2">
    	<li><img src="images/2.png" /></li>
        <li>Password: </li>
    </ol>
    
    <ol id="3">
    	<li><img src="images/3.png" /></li>
        <li>Retype Password: </li>
    </ol>
        
    <ol id="4">
    	<li><img src="images/4.png" /></li>
        <li>Firstname: </li>
    </ol>
    
    <ol id="5">
    	<li><img src="images/5.png" /></li>
        <li>Surname: </li>
    </ol>
    
    <ol id="6">
    	<li><img src="images/6.png" /></li>
        <li>D.O.B: </li>
    </ol>
    
    <ol id="7">
    	<li><img src="images/7.png" /></li>
        <li>Country: </li>
    </ol>
    
    <ol id="8">
    	<li><img src="images/8.png" /></li>
        <li>Email address: </li>
    </ol>    
    
    </div><!--Close signup text-->
    
    <ol id="9">
    	<li><img src="images/9.png" /></li>
        <li>I agree to the TOS:</li><input id="agree" name="agree" type="checkbox" /><li>
    </ol>    
    
    <ol id="9">
        <li><input type="image" src="images/tick.gif" id="login" name="login" /></li>
    </ol>
    </form>
		
    <?php
	}		
	
			
	if ( (isset($_COOKIE['registration'])) && (!isset($_COOKIE['activationstatus'])) && (!isset($_POST['activationsubmit'])) ) {
		echo '<h1>first if statement</h1>';
		$activationcode = rand(100000, 1000000);
				
		$to = $_COOKIE['registration']['regemail'];
		$subject = "ThinkSane.net activation code, IMPORTANT!";
		$email = 'admin@thinksane.net';
		$message = 'Your activation code is ' . $activationcode . '. Copy this code and paste it into the textbox back on the registration page. 
					You will receive another confirmation email once you are fully signed up."';
		$headers = "From:" . $email;
		$sent = mail($to,$subject,$message,$headers);
		
		if ($sent) {
		
					
			echo '<h3>An email has been sent to ' . $_COOKIE['registration']['regemail'] . ' with an activation code in it. <br />
					You must enter that code below before your account is created  </h3>';
		?>
            <form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        	<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            <input name="activationcode" type="hidden" value="<?php echo $activationcode ?>" />
            <input name="activationsubmit" type="submit" /></p>
        	</form>
		<?php	            
				}
		else{
			echo '<h2>The email could not be sent. You entered the address;' . $_COOKIE['registration']['regemail'] . '. Is that the right address?</h2>';
		}
	}
						
	elseif ( ($_COOKIE['activationstatus'] == 'code already sent') ) {
			
			
			$submittedactivationcode = $_POST['submittedactivationcode'];
			$activationcode = $_POST['activationcode'];
			
			if ( $submittedactivationcode == $activationcode ) {
			
			echo '<h2>Two codes are the same, creating and running SQL</h2>';

				/*$sql = "";
				$result = @mysql_query($sql) or die(mysql_error());*/
				
			}
			else{
				echo '<h2>The codes do not match, please check the code sent and try again.</h2>';
				?>
            	<form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        		<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            	<input name="activationsubmit" type="submit" /></p>
        		</form>
				<?php	    
			}
	}
		
	else{
		echo "<p>There was a problem sending the activation code. Please make sure you supplied the right email address.</p>";
		}	
	
		 
		?>
    
    
	</div><!--Close content div tag-->

</div><!--Close container div tag-->

<div class="footer">
<?php 
include 'php_includes/footer.php';
?>
</div>

</body>
</html>

Hi just as i got your message I tried it having put in code that clears the cookies and it is working perfectly.

THANK YOU for looking. You have no idea how many times i thought my head was going to explode over this.

Sometimes I wonder why i love computers and the web.

Anyway thanks again and just for anyone searching via the almighty Google in the future the code that works is shown below.

Suomedia thanks again.

----------------------------------------------------------------

<?php
	
	if ((isset($_POST['submitcheck'])) && ( 
	(isset($_POST['regusername'])) || ($_POST['regusername'] != "") || 
	(isset($_POST['regpassword'])) || ($_POST['regpassword'] != "") || 
	(isset($_POST['regpasswordcheck'])) || ($_POST['regpasswordcheck'] != "") || 
	(isset($_POST['firstname'])) || ($_POST['firstname'] != "") || 
	(isset($_POST['surname'])) || ($_POST['surname'] != "") || 
	(isset($_POST['dob'])) || ($_POST['dob'] != "") || 
	(isset($_POST['country'])) || ($_POST['country'] != "") || 
	(isset($_POST['regemail'])) || ($_POST['regemail'] != "") || 
	(isset($_POST['agree'])) || ($_POST['agree'] != false) )) 
	{

		$regusername = $_POST['regusername'];
		$regpassword = md5($_POST['regpassword']);
		$firstname = $_POST['firstname'];
		$surname = $_POST['surname'];
		$dob = $_POST['dob'];
		$country = $_POST['country'];
		$regemail = $_POST['regemail'];
								
		setcookie("registration[username]", $regusername);
		setcookie("registration[password]", $regpassword);
		setcookie("registration[firstname]", $firstname);
		setcookie("registration[surname]", $surname);
		setcookie("registration[dob]", $dob);
		setcookie("registration[country]", $country);
		setcookie("registration[regemail]", $regemail);
		
		
		header('location:signup.php');
	}
		
	if ( (isset($_POST['activationsubmit'])) ) {			
		setcookie("activationstatus", "code already sent", 60);
		
		setcookie("registration[username]","" , time()-3600);
		setcookie("registration[password]","" , time()-3600);
		setcookie("registration[firstname]","" , time()-3600);
		setcookie("registration[surname]","" , time()-3600);
		setcookie("registration[dob]","" , time()-3600);
		setcookie("registration[country]","" , time()-3600);
		setcookie("registration[regemail]","" , time()-3600);
	}		
		

include 'php_includes/header.php';
pagetitle(Signup);
?>
    
<div class="container">
    	
	<div class="content">
	 
	<?php
     if ((!isset($_COOKIE['registration'])) ){
    ?>
      
    <h3>Follow the steps below to signup and help promote rational thought. Replace this text with step by step image showing user at what stage they are at in the signup process.</h3>
    <form id="signup" name="signup" action="<?php $_SERVER['PHP_SELF'] ?>" method="POST">
    <input name="submitcheck" type="hidden" value="1" />
    <div>All information is required and must be entered. </div>
    
        <div id="signupinputs">
    <ol id="1">
		<li><input id="username" name="regusername" type="text" />
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regusername])) || ($_POST[regusername] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    <ol id="2">
        <li><input id="password" name="regpassword" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpassword])) || ($_POST[regpassword] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="3">
        <li><input id="passwordcheck" name="regpasswordcheck" type="password"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regpasswordcheck])) || ($_POST[regpasswordcheck] == "")) ) { 
		echo '//Error on password'; } 
		?></li>
    </ol>
    <ol id="4">
        <li><input id="firstname" name="firstname" type="text" /></li>
    </ol>
    <ol id="5">
        <li><input id="surname" name="surname" type="text" /></li>
    </ol>
    <ol id="6">
        <li><input id="dob" name="dob" type="text"/></li>
    </ol>
    <ol id="7">
        <li><input id="country" name="country" type="text"/></li>
    </ol>
    <ol id="8">
        <li><input id="regemail" name="regemail" type="text"/>
		<?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[regemail])) || ($_POST[regemail] == "")) ) { 
		echo '//Error on username'; } 
		?></li>
    </ol>
    
    <ol>
    <li><?php if ( (isset($_POST[submitcheck])) && ((!isset($_POST[agree])) || ($_POST[agree] == false)) ) { 
		echo '//Error on TOS'; } 
	?></li>
    </ol>
    
    </div><!--Close signupinputs-->
    
    <div id="signuptext">
    <ol id="1">
    	<li><img src="images/1.png" /></li>
        <li>Username:</li>
    </ol>
    
    <ol id="2">
    	<li><img src="images/2.png" /></li>
        <li>Password: </li>
    </ol>
    
    <ol id="3">
    	<li><img src="images/3.png" /></li>
        <li>Retype Password: </li>
    </ol>
        
    <ol id="4">
    	<li><img src="images/4.png" /></li>
        <li>Firstname: </li>
    </ol>
    
    <ol id="5">
    	<li><img src="images/5.png" /></li>
        <li>Surname: </li>
    </ol>
    
    <ol id="6">
    	<li><img src="images/6.png" /></li>
        <li>D.O.B: </li>
    </ol>
    
    <ol id="7">
    	<li><img src="images/7.png" /></li>
        <li>Country: </li>
    </ol>
    
    <ol id="8">
    	<li><img src="images/8.png" /></li>
        <li>Email address: </li>
    </ol>    
    
    </div><!--Close signup text-->
    
    <ol id="9">
    	<li><img src="images/9.png" /></li>
        <li>I agree to the TOS:</li><input id="agree" name="agree" type="checkbox" /><li>
    </ol>    
    
    <ol id="9">
        <li><input type="image" src="images/tick.gif" id="login" name="login" /></li>
    </ol>
    </form>
		
    <?php
	}		
	
			
	if ( (isset($_COOKIE['registration'])) && (!isset($_COOKIE['activationstatus'])) && (!isset($_POST['activationsubmit'])) ) {
		echo '<h1>first if statement</h1>';
		$activationcode = rand(100000, 1000000);
				
		$to = $_COOKIE['registration']['regemail'];
		$subject = "ThinkSane.net activation code, IMPORTANT!";
		$email = 'admin@thinksane.net';
		$message = 'Your activation code is ' . $activationcode . '. Copy this code and paste it into the textbox back on the registration page. 
					You will receive another confirmation email once you are fully signed up."';
		$headers = "From:" . $email;
		$sent = mail($to,$subject,$message,$headers);
		
		if ($sent) {
		
					
			echo '<h3>An email has been sent to ' . $_COOKIE['registration']['regemail'] . ' with an activation code in it. <br />
					You must enter that code below before your account is created  </h3>';
		?>
            <form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        	<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            <input name="activationcode" type="hidden" value="<?php echo $activationcode ?>" />
            <input name="activationsubmit" type="submit" /></p>
        	</form>
		<?php	            
				}
		else{
			echo '<h2>The email could not be sent. You entered the address;' . $_COOKIE['registration']['regemail'] . '. Is that the right address?</h2>';
		}
	}
						
	elseif ( (isset($_POST['activationsubmit'])) ) {
			
			
			$submittedactivationcode = $_POST['submittedactivationcode'];
			$activationcode = $_POST['activationcode'];
			
			if ( $submittedactivationcode == $activationcode ) {
			
			echo '<h2>Two codes are the same, creating and running SQL</h2>';

				/*$sql = "";
				$result = @mysql_query($sql) or die(mysql_error());*/
				
			}
			else{
				echo '<h2>The codes do not match, please check the code sent and try again.</h2>';
				?>
            	<form id="activation" name="activation" action=<?php echo $_SERVER["PHP_SELF"]; ?> method="POST">
        		<p>Enter the activation code sent in the email: <input name="submittedactivationcode" type="text" />
            	<input name="activationsubmit" type="submit" /></p>
        		</form>
				<?php	    
			}
	}
		
	else{
		echo "<p>There was a problem sending the activation code. Please make sure you supplied the right email address.</p>";
		}	
	
		 
		?>
    
    
	</div><!--Close content div tag-->

</div><!--Close container div tag-->

<div class="footer">
<?php 
include 'php_includes/footer.php';
?>
</div>

</body>
</html>
This article has been dead for over six months. Start a new discussion instead.