There are a few items in the php above that need to be changed in order to get it to work.
Code:
<?php
//if "email" is filled out, check for "name"
if (isset($_REQUEST['email'])) {
//if "name" is filled out, send a couple of mails
if (isset($_REQUEST['name'])) {
$email = $_REQUEST['email'] ;
So far the PHP is good, but the following line makes me wonder.
Code:
$subject = $_REQUEST['subject'] ;
Where in the HTML form do you have a subject field? Let's continue to the next item that needs to be fixed.
This:
Code:
$message = "A password reminder has been sent to <"$_REQUEST['name'] ">" $_REQUEST['email'] ;
Should be like this:
Code:
$message = "A password reminder has been sent to <".$_REQUEST['name']."> ".$_REQUEST['email'];
Notice the dots that seperate (spelling?) the request variable from the message that's going to be sent.
Code:
$username = $_REQUEST['name'];
mail("webmaster@torema.com.br", "Password Reminder Requested",
$message, "From: noreply@torema.com.br";
The above is good, then we come to the same item as before (the dots that seperate the variables from the text). As well as a missing bracket before the last else statement.
Code:
mail($email, "Password Reminder", "Here is a reminder of your password: <br><br>
Username: ".$username."<br>
Password: monkey<br>
Please login at http://torema.com.br/cases.php",
"From: noreply@torema.com.br";
}
else
//if "name" is not filled out, ask them to fill it out
{
echo "please give your name";
}
}
else
//if "email" is not filled out, ask them to fill it out
{
echo "please fill out an email address";
}
?>
Other then that, you should be alright. Hope this helps.
Bookmarks