We are trying to complete / fix the below code, We cant seem to do the following.
I know its basicly there but we can't seem to figure out the final bug. Please have a quick look at the code below and if anyone notices anything that isn't right please advice us. http://pastebucket.com/27517 [CODE] <?php $username = $_POST['username']; $activation_code = $_POST['activation_code']; $activation_codeurl = $activation_code; $usernameurl = $username; $db_host = "localhost"; $db_name = "aardvark"; $db_use = "aardvark"; $db_pass = "aardvark"; $con = mysql_connect("localhost", $db_use, $db_pass); if (!$con){ die('Could not connect: ' . mysql_error()); } mysql_select_db($db_name, $con); $checkcustomer = mysql_query("SELECT `Check_Activation` FROM `members` WHERE `Username` = '".$username."' & `Activation` = '".$activation_code."'; "); $array = mysql_fetch_array($checkcustomer); if (is_null($array['Check_Activation'])) { $username = substr($username, 0, 1); if($username == '1') { $redirect_url='form-one.php?membernumber='.$usernameurl.'&activation_code='.$activation_codeurl; } elseif($username == '2') { $redirect_url='form-two.php?membernumber='.$usernameurl.'&activation_code='.$activation_codeurl; } elseif($username == '3') { $redirect_url='form-three.php?membernumber='.$usernameurl.'&activation_code='.$activation_codeurl; } header("Location:". $redirect_url); } else { ?> |
How is that question related to the SQL Anywhere database system?
Agreed. This looks like this should be a PHP question... or at least direct it at a mysql or LAMP forum.