RKS
2010-06-15 23:00:01 UTC
* indicates required information
If you have to use PHP, where can you get the code for the form. Also, how do you test it without loading it to a website?
Four answers:
2010-06-16 00:28:30 UTC
Your current hosting package MUST allow SMTP ( http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol ) to work. Otherwise, no email can be sent.
Use any of the below sites to make the workable form you need:
For making forms:
These are really good online form makers. Just follow the instructions for making it and uploading file(s).
http://www.jotform.com/?gclid=CNKhqei1wJ4CFRQhnAod6laUqA (WYSIWYG Form Maker)
http://www.thesitewizard.com/wizards/feedbackform.shtml
Ajax - Creating an HTML Form: http://www.tizag.com/ajaxTutorial/ajaxform.php
http://www.phpform.org/
http://www.tele-pro.co.uk/scripts/contact_form/
http://www.thepcmanwebsite.com/form_mail.shtml
http://emailmeform.com/
http://www.freecontactform.com/
http://www.reconn.us/content/view/12/34/ (Download - Contact Us Script)
Ron
2016-10-05 01:41:47 UTC
?
2010-06-15 23:15:05 UTC
Chris C
2010-06-15 23:25:12 UTC
action="mailto:joe.hablano@live.com"
To the PHP web page, like this (obviously you can call any PHP file that is on your website:
action="myemailform.php"
In all honesty, I often code this so that the form and the actual send are part of the same PHP page. Then you can do something like this in PHP:
action="$_SERVER['PHP_SELF']"
The form can then be entirely self-contained.
Here's an example of PHP code that can be used to send mail from your web site:
$MP = "/usr/sbin/sendmail -t";
if ($formFill && (! empty($recipient)) && $properlyFilled) {
$fd = popen($MP,"w");
fputs($fd, "To: $toEmail\n");
fputs($fd, "From: $fullFromEmail>\n");
fputs($fd, "Subject: Whatever subject you want for the email here!\n");
fputs($fd, "X-Mailer: PHP\n");
fputs($fd, "Content-Type: text/html; charset=us-ascii\n");
fputs($fd, "Content-Transfer-Encoding: 7bit\n");
fputs($fd, "\n");
// Repeat creating the body of the email here, by using the same code as above,
// creating an email that is HTML based. Example just below
fputs($fd, "This message is from: $fName $lName
\nwhatever text you want goes in this location");
fputs($fd, "\n");
pclose($fd);
} else {?>
}
?>
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.