Reply to Re: Newbe Question

Your name:

Reply:


Posted by Steve on 11/17/07 16:33

"Sam Bench" <roykoch@comcast.net> wrote in message
news:OuWdnQ-z09hfiaLanZ2dnUVZ_oKhnZ2d@comcast.com...
>I am very new to php and know virtually nothing about it. I want to do a
>very simple task:
>
> I have a form that generates 5 outputs: $name, $email, $number,and
> $mission, $type. I want to have a .php file email these 5 outputs to a
> certain email address. I am close to figuring out how to do this. I have
> setup a .php file as follows:
>
> <?php
> @extract($_POST);
> $name = stripslashes($name);
> $email = stripslashes($email);
> $number = stripslashes($number);
> $mission= stripslashes($mission);
> $type=stripslashes($type);
> $strsub="Poinsettia Order";
> $mail_body=$name+$email+$mission+$type+$number;

this is not VB or javascript. php uses a dot/period (.) to concatenate
strings. the above should result in $mail_body being a number.

> mail('joesmith@comsat.com', $strsub,$mail_body, "From: $name <$email>");
> echo("Thank you for your poinsettia order. Your order was sent to the
> admin in charge.");
> ?>

i assume this is just a test email, as the above would result in a pretty
ugly email.

> I have uploaded the .html form and the above .php file to my server. When
> I run the form, I almost get what I want. When I hit send on the form I
> get an email sent to me. It has $strsub as the subject. It has $name
> <$email>in the From field. However, in the body of the email I don't get
> all the form information that I want. In fact, the above code just sends
> me $number.

hmmmm...i wonder why that is...oh yeah, see first comment.

> The rest of the form info is missing. How can I fix the code so that all
> 5 fields that I want appear in the body of the email that gets sent to me?
>
> Thanks in advance.
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация