I am recieving a parsing error and I haven't been able to find it.
I have followed these suggustions:
It's easy with arrays and string keys to get parse errors on account of the complex syntax. As a rule of thumb, wrap your array name in curly braces when using them within double quotation marks. Example: $message = "{$array['key']}..etc.";
It's not required in PHP to enclose your keys with quotation marks when referring to array elements ($array[key]), but it is a good idea ($array['key']).
I tried both of the changes to the added code. It was starting to work as the error was moving to the next line as I corrected each line. After correcting 4 lines of the added code the same error then showed up in the original code and there were no errors prior to the added code.
This the original code:
$misc->log_action ($lang['log_created_user'] . ': ' . $_POST['edit_user_name']);
if ($config['email_notification_of_new_users'] == 1) {
// if the site admin should be notified when a new user is added
$message = $_SERVER['REMOTE_ADDR'] . ' -- ' . date('F j, Y, g:i:s a') . "\r\n\r\n" . $lang['admin_new_user'] . ":\r\n" . $config['baseurl'] . '/admin/index.php?action=user_manager&edit=' . $new_user_id . "\r\n"; $header = 'From: ' . $config['admin_name'] . ' <' . $config['admin_email'] . ">\r\n";
$header .= "X-Sender: $config[admin_email]\r\n";
$header .= "Return-Path: $config[admin_email]\r\n";
mail("$config[admin_email]", "$lang[admin_new_user]", $message, $header);
} // end if
} // end if
else {
$display .= '<p>' . $lang['alert_site_admin'] . '</p>';
} // end else
} // end if
} // end else
}else {
$display .= '<form action="?action=signup&type=' . $type . '" method="post">';
instructions for added code.
find following line:
mail("$config[admin_email]", "$lang[admin_new_user]", $message, $header);
} // end if
After this, paste the following lines into the source:
//BEGIN notification of new registered users
notification_email = $_POST['user_email'];
global $config, $lang;
$message = "Welcome ";
$message .= $_POST['edit_user_name'];
$message .= "!\r\n\r\n";
$message .= "Your registration has been completed.\r\n\r\n";
$message .= "Your Login-Information:\r\n\r\n";
$message .= "Username: ";
$message .= $_POST['edit_user_name'];
$message .= "\r\n";
$message .= "Password: ";
$message .= $_POST['edit_user_pass'];
$message .= "\r\n";
$message .= "Your Email-Adress: ";
$message .= $_POST['user_email'];
$message .= "\r\n\r\n";
$message .= "Your-User-ID is: ";
$message .= $new_user_id;
$message .= "\r\n\r\n";
$message .= "If you want support, please contact $config[admin_email]\r\n\r\n";
$message .= "Regards,\r\nYour $config['site_title']-Team\r\n";
$header = "From: ".$config['site_title']." <".$config['admin_email'].">\r\n";
$header .= "X-Sender: $config[admin_email]\r\n";
$header .= "Return-Path: $config[admin_email]\r\n";
mail("$notification_email", "Welcome to ".$config['site_title'], $message, $header);
//END notification of new registered users
attached is the file.
I would really appreciate some help.
DataCom2004