Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > HTML
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

HTML HTML problems, maybe you are trying to code for MySpace. Get all the HTML coding help here for your website.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 10-14-2006, 9:32 PM   #1
basher1001
Member Level 2
 
basher1001's Avatar
 
Join Date: Oct 2006
Posts: 14
My Photos: (0)
iTrader: (0)

Banked:
MK Cash: $0.00

I am Worth:
MK Cash: $0.00
Donate

Recent Blog: None

basher1001 is on a distinguished road
Default Form

Hi i want to set up a form on my website, so people who enquier about my dog training consultations can simply leave details and a breif description of the problem. if someone can send me the coding for it i can work the rest out cheers
MATT
__________________
Printing canvas, posters and all sorts since 2007 :)

Ask me about getting tshirts done with embroidery for your business.

[url="http://www.back-to-nature-dog-training.co.uk"] Dog Training.;/url]
basher1001 is offline  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Old 10-14-2006, 9:47 PM   #2
MadKad
Website Owner
 
MadKad's Avatar
 
Join Date: Mar 2006
Location: UK
Posts: 3,889
My Photos: (46)
iTrader: (3)

Banked:
MK Cash: $3.06

I am Worth:
MK Cash: $1.92
Donate


MadKad is a jewel in the roughMadKad is a jewel in the roughMadKad is a jewel in the rough
Default

Here you go try this, its in php I am not very great at php but this is a try

E-mail Form Code (for contact.php page)
PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Email Form </title>
</head>
<body>

<form method="post" action="sendmail.php">

<!-- DO NOT change ANY of the php sections -->
<?php
$ipi 
getenv("REMOTE_ADDR");
$httprefi getenv ("HTTP_REFERER");
$httpagenti getenv ("HTTP_USER_AGENT");
?>

<input type="hidden" name="ip" value="<?php echo $ipi ?>" />
<input type="hidden" name="httpref" value="<?php echo $httprefi ?>" />
<input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />
Attention:<br />
<select name="attn" size="1">
<option value=" Quote ">Quote </option> 
<option value=" General Support ">General Support </option> 
<option value=" Technical Support ">Technical Support </option> 
<option value=" Webmaster ">Webmaster </option> 
</select>
<br /><br />
Mail Message:
<br />
<textarea name="notes" rows="4" cols="40"></textarea>
<br />
<input type="submit" value="Send Mail" />
<br />
</form>

</body>
</html>
that is for your contact page then you will need this

make a file called sendmail.php


PHP Code:
<?php
$ip 
$_POST['ip']; 
$httpref $_POST['httpref']; 
$httpagent $_POST['httpagent']; 
$visitor $_POST['visitor']; 
$visitormail $_POST['visitormail']; 
$notes $_POST['notes'];
$attn $_POST['attn'];
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<title>Sendemail Script</title>
</head>
<body>

<!-- Reminder: Add the link for the 'next page' (at the bottom) --> 
<!-- Reminder: Change 'YourEmail' to Your real email --> 

<?php
if(!$visitormail == "" && (!strstr($visitormail,"@") || !strstr($visitormail,"."))) 
{
echo 
"<h2>Use Back - Enter valid e-mail</h2>\n"
$badinput "<h2>Feedback was NOT submitted</h2>\n";
echo 
$badinput;
}
if(empty(
$visitor) || empty($visitormail) || empty($notes )) {
echo 
"<h2>Use Back - fill in all fields</h2>\n";
}

$todayis date("l, F j, Y, g:i a") ;

$attn $attn 
$subject $attn

$notes stripcslashes($notes); 

$message " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n 
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
"
;

$from "From: $visitormail\r\n";


mail("YourEmail"$subject$message$from);

?>

<p align="center">
Date: <?php echo $todayis ?> 
<br />
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> ) 
<br />

Attention: <?php echo $attn ?>
<br /> 
Message:<br /> 
<?php $notesout str_replace("\r""<br/>"$notes); 
echo 
$notesout?> 
<br />
<?php echo $ip ?> 

<br /><br />
<a href="contact.php"> Next Page </a> 
</p> 

</body>
</html>
change the contact.php on the sendmail.php page to what you might want as a return link, and in the

mail("YourEmail", $subject, $message, $from);

section add you email to

mail("YourEmail", $subject, $message, $from);

and thats it all should be working.
MadKad is online now  
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags:




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
contact form not working? Klaas_Koopman PHP 20 05-10-2006 2:35 PM


Featured Websites




All times are GMT +1. The time now is 1:15 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98