Well I altered my sql table to reflect what the code was asking for. Then I ran into an unexpected message:
Notice: Undefined variable: email in /home/content/53/8957353/html/activation.php on line 24
email=
Notice: Undefined variable: password in /home/content/53/8957353/html/activation.php on line 25
password=
1
I’m not sure I understand why this is happening. Attached is the code to activation.php code. What am I missing now?
[php]<?php
// If the GET variable id is not empty, we run this script, if variable is empty we give message at bottom
// Force script errors and warnings to show on page in case php.ini file is set to not display them
error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);
//-----------------------------------------------------------------------------------------------------------------------------------
if ($_GET[‘id’] != “”) {
//Connect to the database through an include
include_once "connect_to_mysql.php";
$id = $_GET['id'];
$hashpass = $_GET['sequence'];
$id = mysql_real_escape_string($id );
// $id = preg_match("", "
", $id);
$hashpass = mysql_real_escape_string($hashpass);
// $hashpass = preg_match("", "
", $hashpass);
$sql = mysql_query("UPDATE memberFiles SET email_activated='1' WHERE id='$id' AND password='$hashpass'");
$sql_doublecheck = mysql_query("SELECT * FROM memberFiles WHERE id='$id' AND password='$hashpass' AND email_activated='1'");
$doublecheck = mysql_num_rows($sql_doublecheck);
if($doublecheck == 0){
$msgToUser = "<br /><br /><h3><strong><font color=red>Your account could not be activated!</font></strong><h3><br />
<br />
Please email site administrator and request manual activation.
";
include 'msgToUser.php';
exit();
} elseif ($doublecheck > 0) {
$msgToUser = "<br /><br /><h3><font color=\"#0066CC\"><strong>Your account has been activated! <br /><br />
Log In anytime up top.</strong></font></h3>";
include 'msgToUser.php';
exit();
}
} // close first if
print "Essential data from the activation URL is missing! Close your browser, go back to your email inbox, and please use the full URL supplied in the activation link we sent you.
[email protected]
";
?>[/php]