"Shawn McKenzie" <> wrote in message
news:[email protected]...
> Tom wrote:
>> My Hosting site said that I needed to include the PHP otherwise the form
>> won't work. I need to know where to include my email info to get this set
>> up
>> don't I? What do you suggest?
>> T
>> "Daniel Brown" <[email protected]> wrote in message
>> news:[email protected]...
>>> On Mon, Jan 26, 2009 at 15:57, Tom <[email protected]> wrote:
>>>> I am a new user of PHP, and am using Dreamweaver CS3 for the webpages.
>>>> The
>>>> following page has my form but the submit button is not working
>>>> properly.
>>>> http://www.richlandmtg.com/contacts.html
>>>> What code is needed and where does it get placed in the page.? I
>>>> thought
>>>> CS3
>>>> took care of this.
>>> Tom,
>>>
>>> This issue has nothing at all to do with PHP. This is all client
>>> side (JavaScript and HTML).
>>>
>>> --
>>> </Daniel P. Brown>
>>> [email protected] || [email protected]
>>> http://www.parasane.net/ || http://www.pilotpig.net/
>>> Unadvertised dedicated server deals, too low to print - email me to find
>>> out!
>>
>>
>
> What you have now is a form that when submitted sends the data to
> itself. So you either need to include some php in this file to gather
> up the data and email it when submitted, or submit to another file that
> does that.
>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
Shawn,
So would that look something like this:
<?
if ($_SERVER['REQUEST_METHOD'] == "POST") {
// Just to be safe, I strip out HTML tags
$realname = strip_tags($realname);
$email = strip_tags($email);
$feedback = strip_tags($feedback);
// set the variables
// replace [email protected] with your email
$sendto = "[email protected]";
$subject = "Sending Email Feedback From My Website";
$message = "$realname, $email\n\n$feedback";
// send the email
mail($sendto, $subject, $message);
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php