Reply to Re: basic help needed..

Your name:

Reply:


Posted by Taxi Driver on 07/24/05 19:14

In this example where the email code is on the same page as the form,
what should the "form action" be set to. Assuming that there is no
need for another php page.

Another way to ask the same question is, is it ok to leave the "form
action" blank?

Geoff Berrow:
Geoff Berrow <blthecat@ckdog.co.uk> a écrit dans le message :
>I noticed that Message-ID: <O-mdnQMZoZHreX_fRVn-2Q@rogers.com> from
>Trypt contained the following:
>
>>B. A redirection to a html page. For example, when the user completes
>>the form, I'd like them to be taken to a success.html page if
>>successful, or error.html if not.
>
>Make sure that this is the only thing on this page. Then do:
>
><?
>$Name=$_POST['Name'];
>$Email=$_POST['Email'];
>$Comments=$_POST['Message'];
>$to="contact@webhost.com";
>$message="$Name just filled in your contact form. Message
>was:\n$Message\n\nTheir E-Mail address was: $Email";
>if(mail($to,"Comments From Your Site",$message,"From: $Email\n")) {
>header("Location: success.html");
>} else {
>header("Location: error.html");
>}
>?>
>
>(assuming these pages are in the same directory. To be safe, use the
>full URL)

[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

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