Re: not sure why form submission gives me error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I recommend PSPad

2005/7/16, Bruce Gilbert <webguync@xxxxxxxxx>: 
> 
> Hello,
> 
> I have a form on my site
> 
> http://www.inspired-evolution.com/Contact.php
> 
> produces this error on submission
> 
> Parse error: parse error, unexpected T_STRING in
> /hsphere/local/home/bruceg/inspired-evolution.com/Thankyou.php<http://evolution.com/Thankyou.php>on line
> 35
> 
> here is the PHP code, please let me know if you see where the error is:
> 
> Also, if someone has a good editor, that may provide the clue. I don't
> have a good PHP editor at my disposal yet :-(
> 
> <?php
> $name=$_POST["firstname"];
> $name=$_POST["lastname"];
> $company=$_POST["company"];
> $phone=$_POST["phone"];
> $email=$_POST["email"];
> $email2=$_POST["email2"];
> $URL=$_POST["URL"];
> $Contact_Preference=$_POST["Contact_Preference"];
> $Contact_Time=$_POST["Contact_Time"];
> $message=$_POST["Message"];
> 
> if ((!$firstname) || (!$Contact_Preference)) { echo
> '<p><strong>Error!</strong> Fields marked * are required to
> continue.</p></br>'; include 'include/contact.php'; return; }
> 
> if (!eregi("^[a-z0-9]+([_\\.-][a-z0-9]+)*"
> ."@"."([a-z0-9]+([\.-][a-z0-9]+)*)+"."\\.[a-z]{2,}"."$",$email)) {
> echo '<p>Invalid email address entered</p></br>'; include
> 'include/contact.php'; return; }
> 
> $formsent=mail("webguync@xxxxxxxxx",
> "There has been a disturbance in the force",
> "Request from:$firstname $lastname\r\n
> Company name: $company\r\n
> Phone Number: $phone\r\n
> Email Address: $email\r\n
> Retyped Email Address: $email2\r\n
> URL: $URL\r\n
> Please Contact me via: $Contact_Preference\r\n
> The best time to reach me is: $Contact_Time\r\n
> I wish to request the following additional information: $Textarea");
> if ($formsent) {
> echo "<p> Hello,<strong> $firstname</strong>.</p>
> <p> We have received your request for additional information, and will
> respond shortly.</p>
> <p> Thanks for visiting inspired-evolution.com<http://inspired-evolution.com>and have a wonderful day!</p>";
> 
> }
> ?>
> 
> --
> ::Bruce::
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux