Hallo PHP friends.
My hosting server switched register global to off. Since then my script does not work anymore. I do not know what to change to my script. Can somebody help me?
My colleagues fill the form out when they have forgotten the password and username, an email is sent to them to inform them about username and password.
Here below the form:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>password request</title>
</head>
<body>
<p>Dear F/A, for security reason I can only send username and password to your
E-mail address at ?.</p>
<p>You have to enter your <strong>4 letter code</strong> <strong>as you use it
for your crewmail address</strong>. A email will be sent to you instantly. <br />
<br />
</p>
<form action="password_request.php" method="post">
Write your 4 Letter Code here:
<input type="text" name="first_name" size="10" />
example: popa<br />
<br />
<input type="submit" name="submit" value="Send My request" />
</form>
</body>
</html>
And here the php script password_request.php
<html>
<head>
<title>password request script</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
// Address error handing.
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
// In case register_globals is disabled.
$first_name = $_POST['first_name'];
$posting = $_POST['posting'];
// Create a name variable.
$name=ucfirst($first_name);
$full_email = $name.'@address.com';
// Print the message.
print "Thank you, <font color=\"red\">$name</font>, for your request. Click <a href=\"https://mail.com\" target=\"_blank\"> here </a> to go to your crewmail box and get username and password. Go back to<strong> <a href=\"http://www.xy.info\" target=\"_top\">mysite.info </a></strong></font> and log in.</p><br/>
<p>$posting</p>";
// Send the email.
$body = "Thank you for visiting www.mysite.info! Login informations: \n
username=xyz \n
password=xyq. \n
Go back to www.mysite.info, click on Login and enter the wording xyz (for username) and xyq (for password).\n
If you experience login problems, don't hesitate to contact me at [email]blabla@tele2.ch[/email] \n
Have fun with my homepage. \n
my name \n ";
mail ($full_email, 'www.mysite.info login informations', $body, "From: [email]myaddress@xy.ch[/email] (my name)");
?>
</body>
</html>
Can somebody help me please?
Thanks