OK,
I know that plenty has been posted regarding this subject, but I'm completely lost and confused and I apologize for this...
I'm talking about the standard: enter data, check for required fields, if required fields are empty return to page with data entered still there.
1. I have register_globals set to OFF (would like to keep it this way).
2. Within an HTML form I have <form method="post" action="/test/sendmail.php">. Sendmail.php gets the data from the initial form and creates a message that's e-mailed to our office. Here's a bit of that code:
<?
$message = $_REQUEST['message'] ;
$ProdName = $_REQUEST['ProdName'] ;
$ProdTel = $_REQUEST['ProdTel'] ;
$ProdFax = $_REQUEST['ProdFax'] ;
$ProdEmail = $_REQUEST['ProdEmail'] ;
$contact = $_REQUEST['contact'] ;
$message = "UNDERWRITER \n";
$message .= "$underwriter \n\n";
$message .= "PRODUCER \n";
$message .= "Name: $ProdName \n";
$message .= "Telephone: $ProdTel \n";
$message .= "Fax: $ProdFax \n";
$message .= "Email: $ProdEmail \n";
$message .= "Contact Name: $contact \n\n";
if (empty($_REQUEST['ProdEmail'])) {
header( "Location: );
}
else {
mail( "el@abc.org", "Transportation Quickquote",
$message, "From: $ProdEmail");
header( "Location: );
}
?>
So it goes back, but of course the initial form is blank.
I've seen that I should use:
<? echo "$_GET['ProdName']";?>
But, where would I put it? Would it be in the <input name="ProdName" type="text"> tag(s)? I tried to do this, but maybe my syntax was not right, it didn't work.
Can anyone please shed some light on why it's not working?
I know that plenty has been posted regarding this subject, but I'm completely lost and confused and I apologize for this...
I'm talking about the standard: enter data, check for required fields, if required fields are empty return to page with data entered still there.
1. I have register_globals set to OFF (would like to keep it this way).
2. Within an HTML form I have <form method="post" action="/test/sendmail.php">. Sendmail.php gets the data from the initial form and creates a message that's e-mailed to our office. Here's a bit of that code:
<?
$message = $_REQUEST['message'] ;
$ProdName = $_REQUEST['ProdName'] ;
$ProdTel = $_REQUEST['ProdTel'] ;
$ProdFax = $_REQUEST['ProdFax'] ;
$ProdEmail = $_REQUEST['ProdEmail'] ;
$contact = $_REQUEST['contact'] ;
$message = "UNDERWRITER \n";
$message .= "$underwriter \n\n";
$message .= "PRODUCER \n";
$message .= "Name: $ProdName \n";
$message .= "Telephone: $ProdTel \n";
$message .= "Fax: $ProdFax \n";
$message .= "Email: $ProdEmail \n";
$message .= "Contact Name: $contact \n\n";
if (empty($_REQUEST['ProdEmail'])) {
header( "Location: );
}
else {
mail( "el@abc.org", "Transportation Quickquote",
$message, "From: $ProdEmail");
header( "Location: );
}
?>
So it goes back, but of course the initial form is blank.
I've seen that I should use:
<? echo "$_GET['ProdName']";?>
But, where would I put it? Would it be in the <input name="ProdName" type="text"> tag(s)? I tried to do this, but maybe my syntax was not right, it didn't work.
Can anyone please shed some light on why it's not working?