I don't know the problem. I assume the code has an error somewhere. It stops at this part of the code and displays a blank page when called. Here is the full page:
<?php
include '../includes/db.php';
// Define post fields into simple variables. These are called CONSTANTS.
$dl = $_POSTї'dl'];
$birth = $_POSTї'birth'];
/* Lets strip some slashes in case the user entered
any escaped characters. */
$dl = stripslashes($dl);
$birth = stripslashes($birth);
/* Do some error checking on the form posted fields */
if((!$dl) || (!$birth)){
header('Location: forgot2.php');
/*echo 'You did not submit the following required information! <br />';
if(!$dl){
echo "Drivers License is a required field. Please enter it below.<br />";
}
if(!$birth){
echo "Birth Date is a required field. Please enter it below.<br />";
}
include 'forgot.php'; // Show the form again!
/* End the error checking and if everything is ok, we'll move on to
creating the user account */
exit(); // if the error checking has failed, we'll exit the script! */
}
// Find record in database.
$result = mysql_query("SELECT first_name, last_name, email_address, username, decrypted_password, dl, birth FROM users WHERE dl='$dl' AND birth='$birth' ") or die (mysql_error());
if (!$result) {
print "ERROR - browse query failed.";
exit();
}
while ( $row = mysql_fetch_array($result) )
{
$username = $rowї'username'];
$password = $rowї'decrypted_password'];
$first = $rowї'first_name'];
$last = $rowї'last_name'];
$last = $rowї'email_address'];
$activatepath = "/students/login.php";
// Let's mail the user!
$subject = "USERNAME and PASSWORD request at $sitename";
$message = "Dear $first $last,
You or someone posing to be you requested that a copy of your USERNAME and PASSWORD to be sent to this email address.
Please disregard this email if you did not request it. However, if you do wish to login to your BLASTER account, click on the following link (or copy/paste it into your browser address bar):
$sitepath$activatepath
Your information for login is stated below:
Username: $username
Password: $password
**Please keep this username and password in a location that is easily accessible by you.
Thanks!
$sitename
http://www.ticketblasters.com
bs:281.457.6700
This is an automated response, please do not reply!";
mail($email, $subject, $message, "From: $sitename <$adminemail>\nX-Mailer: PHP/" . phpversion());
header('Location: _success_forget.php');
//echo $email;
}
?>
<?php
include '../includes/db.php';
// Define post fields into simple variables. These are called CONSTANTS.
$dl = $_POST['dl'];
$birth = $_POST['birth'];
/* Lets strip some slashes in case the user entered
any escaped characters. */
$dl = stripslashes($dl);
$birth = stripslashes($birth);
/* Do some error checking on the form posted fields */
if((!$dl) || (!$birth)){
header('Location: forgot2.php');
/*echo 'You did not submit the following required information! <br />';
if(!$dl){
echo "Drivers License is a required field. Please enter it below.<br />";
}
if(!$birth){
echo "Birth Date is a required field. Please enter it below.<br />";
}
include 'forgot.php'; // Show the form again!
/* End the error checking and if everything is ok, we'll move on to
creating the user account */
exit(); // if the error checking has failed, we'll exit the script! */
}
// Find record in database.
$result = mysql_query("SELECT first_name, last_name, email_address, username, decrypted_password, dl, birth FROM users WHERE dl='$dl' AND birth='$birth' ") or die (mysql_error());
if (!$result) {
print "ERROR - browse query failed.";
exit();
}
while ( $row = mysql_fetch_array($result) )
{
$username = $row['username'];
$password = $row['decrypted_password'];
$first = $row['first_name'];
$last = $row['last_name'];
$last = $row['email_address'];
$activatepath = "/students/login.php";
// Let's mail the user!
$subject = "USERNAME and PASSWORD request at $sitename";
$message = "Dear $first $last,
You or someone posing to be you requested that a copy of your USERNAME and PASSWORD to be sent to this email address.
Please disregard this email if you did not request it. However, if you do wish to login to your BLASTER account, click on the following link (or copy/paste it into your browser address bar):
$sitepath$activatepath
Your information for login is stated below:
Username: $username
Password: $password
**Please keep this username and password in a location that is easily accessible by you.
Thanks!
$sitename
http://www.ticketblasters.com
bs:281.457.6700
This is an automated response, please do not reply!";
mail($email, $subject, $message, "From: $sitename <$adminemail>\nX-Mailer: PHP/" . phpversion());
header('Location: _success_forget.php');
//echo $email;
}
?>
The email is not being generated. Nor is the page redirecting (as the header states). So the page is blank. I did some testing on the page to show me where the code was stopping, and that is the code I posted originally.
What is the error levels set as? If they are off (or to low) you might want to consider bumping them up so that any error messages that are supressed gets visible to you.
For the record, you would change you Error Level reporting in your php.ini file. I believe you can also set it in the script using the [php_man]error_reporting() [/php_man]function