Re: Undefined Variable
| From: | Anthony Ritter | Date: | Sat, 14 Dec 2002 22:03:09 +0000 |
| Subject: | Re: Undefined Variable | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-128298@lists.php.net to get a copy of this message | ||
>"Marco Tabini <marcot@tabini.ca> wrote in message:
> Best guess, your local server has register_globals on and your ISP
> doesn't. However, without seeing your code it's going to be difficult to
> tell for sure! :-)
>
>
> Marco
....................................................
Thanks for the reply Marco.
The following is the code. Any advice would be greatly appreciated.
Happy holidays...
Tony
....................................
//this is the the html page
<HTML>
<FORM ACTION="http://www.narrowsburg.org/getform.php"
METHOD="POST">
Your Name:<BR><INPUT TYPE="TEXT" NAME="thename"
SIZE="40"><BR>
Business Name:<BR><INPUT TYPE="TEXT" NAME="bizname"
SIZE="40"><BR>
Contact Person:<BR><INPUT TYPE="TEXT" NAME="contactname"
SIZE="40"><BR>
Telephone Number:<BR><INPUT TYPE="TEXT" NAME="phone"
SIZE="40"><BR>
e-mail address:<BR><INPUT TYPE="TEXT" NAME="email"
SIZE="40"><BR>
Mailing Address:<BR><INPUT TYPE="TEXT" NAME="mailing"
SIZE="40"><BR>
Town:<INPUT TYPE="TEXT" NAME="town"
SIZE="40"><BR>State:<INPUT TYPE="TEXT"
NAME="state" SIZE="7">  Zip Code:<INPUT
TYPE="TEXT" NAME="zip"
SIZE="11"><BR>
Category:<BR><INPUT TYPE="TEXT" NAME="cat"
SIZE="40"><BR>
Description of your business: <TEXTAREA NAME="description" ROWS=5
COLS=27></TEXTAREA><BR><BR>
<INPUT TYPE="SUBMIT" NAME="SUBMIT" VALUE="Submit
Form"><BR>
</FORM>
</HTML>
....................
//this is the .php file called "getform.php"
<?
if (($thename == "") && ($email == "") && ($description ==
"")) {
header("Location: http://localhost/n_proserv_x.html");
exit;
}
$msg = "This e-mail was sent from:\n";
$msg .= "Sender's Name: $thename\n";
$msg .= $thename ."'s business name is: $bizname\n";
$msg .= "The contact person is: $contactname\n";
$msg .= $thename. "'s phone number is: $phone\n";
$msg .= $thename. "'s e-mail address is: $email\n";
$msg .= $thename. "'s mailing address is: $mailing\n";
$msg .= "Town: $town\n";
$msg .= "State: $state\n";
$msg .= "Zip Code: $zip\n";
$msg .= $thename."'s category is: $cat\n";
$msg .= "and the message is: $description\n\n";
$to = "tony@gonefishingguideservice.com";
$subject = "Narrowsburg Chamber of Commerce";
$mailheaders = "From: $thename\n";
$mailheaders .= "Reply to:$email\n\n";
mail($to, $subject, $msg, $mailheaders);
?>
.................