View Full Version : Basic html contact form
wentwooddownhill
06-27-2007, 04:55 PM
im looking for just a basic contact for in html. It needs to be html as i stupidly created an image in photoshop which incorporated hyperlinks so now i am stuck with the contact.html for example
Smimmon
08-22-2007, 01:57 PM
As a non-programmer i'd suggest using some php contact form generator. You can find one on http://40secscontactform.com
It has all the essential functions, spam protection and looks good at my site.
boogyman
08-22-2007, 03:31 PM
im looking for just a basic contact for in html. It needs to be html as i stupidly created an image in photoshop which incorporated hyperlinks so now i am stuck with the contact.html for example
if you didnt save the psd file, then yes you would need to create a new image, or just stick with the one you have...
now as for the contact email... the processing and sending of the email does not have to be totally html. if you know how to create a form inputs then u can use the script below, and whatever you put in the form will be sanitized and added to the body of the email.
if you do not know how to create form inputs or you do not have access to server that supports php, then you would need to use some free service processing like Smimmon suggested
contact.html
<form name="form" method="post" action="process.php">
__YOUR_INPUT__
<input type="submit" name="submit" value="Send Email">
</form>
process.php
$to = _YOUR_EMAIL_;
$subject = _SUBJECT_OF_EMAIL_;
$message = " ";
$from = $_REQUEST['_from_input_name_'];
foreach($_REQUEST as $key => $value) {
$message .= "<p><strong>" . trim(strip_tags($key)) . "</strong> - " . trim(strip_tags($value)) . "</p>";
}
if( !mail($to, $subject, $message, "From: $from") ) {
echo "Send Email Failed Please Try Again Later";
}
else {
echo "Email Sent <a href=\"history.go(-2)\">Go Back</a> to previous page";
}
update the _from_input_name_ to the name of the input you are using to grab the senders email
eg if you are using
<input type="text" name="from_email" value="">
you would replace _from_input_name_ with from_email
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.