Re: Re: Feedback form problem........

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

 



U should Use

$message= $txtname."<".$txtemail.">" ;

or

$message="$txtname<$txtemail>";

instead of

$message = "From: $txtname ($txtemail)\n


On Fri, Mar 28, 2008 at 8:43 PM, Larry Helms <larr_helms@xxxxxxxxx> wrote:
>
>
>
>
>
>
> - As has been pointed out already, check your error log - find out where it
> is by looking
>  in php.ini.
>
>  - You OVER code. I noted that you pulled stuff in from $_POST and then just
> moved it to
>  another variable. Why? It's much simpler to just fetch stuff from $_POST,
> into the
>  variables that you're eventually going to use.
>
>  - You also had a variable $notes, which merely did a 'stripslashes($notes)'
> ... BUT you
>  never assigned any value to $notes - at least in the snippet of code
> supplied.
>
>  - The biggest problems you will run into in PHP, are not ending statements
> with semi-
>  colon and misspelling.
>
>  Simplified code:
>
>  <?php
>
>  $from = $_POST['txtname'];
>  $email = $_POST['txtemail'];
>  $phone = $_POST['txttel'];
>  $city = $_POST['txtcity'];
>  $subject = $_POST['txtselect'];
>  $comments = stripslashes($_POST['txtcomments']);
>
>  $message = "From: $from ($email)\n
>  Tel No: $phone\n
>  City: $city \n
>  Type: $subject \n
>  Comments: $comments \n";
>
>
>  mail ("email@xxxxxxxxxxxx", $subject, $message, $from);
>
>  ?>
>
>  

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux