tempest 0 Report post Posted July 5, 2006 Hello! I run pass some tutorial here and saw, that here isn`t normal tutorial for simple feedback (contact) form! So, I`m going to write one here! Let`s start: <table width="400" border="0" align="center" cellpadding="3" cellspacing="1"><tr><td><strong>Contact Form </strong></td></tr></table><table width="400" border="0" align="center" cellpadding="0" cellspacing="1"><tr><td><form name="form1" method="post" action="send_contact.php"><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td width="16%">Subject</td><td width="2%">:</td><td width="82%"><input name="subject" type="text" id="subject" size="50"></td></tr><tr><td>Detail</td><td>:</td><td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td></tr><tr><td>Name</td><td>:</td><td><input name="name" type="text" id="name" size="50"></td></tr><tr><td>Email</td><td>:</td><td><input name="customer_mail" type="text" id="customer_mail" size="50"></td></tr><tr><td> </td><td> </td><td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td></tr></table></form></td></tr></table> Paste this code into Notepad and save it as contact.php . That`s the first step! Ofcourse you can change all the questions or add some! Next step is to creat in-comeing form, so here is code for it - <?php// Contact subject$subject ="$subject";// Details$message="$detail";// Mail of sender$mail_from="$customer_mail";// From$header="from: $name <$mail_from>";// Enter your email address$to ='someone@somewhere.com';$send_contact=mail($to,$subject,$message,$header);// Check, if message sent to your email// display message "We've recived your information"if($send_contact){echo "We've recived your contact information";}else {echo "ERROR";}?> Save it as send_contact.php There is something more, that you need to do, so find // Enter your email address $to ='someone@somewhere.com'; in second code and change someone@somewhere.com to your e-mail! In my mind that got to work! http://forums.xisto.com/no_longer_exists/ - that`s how it looks for me! Share this post Link to post Share on other sites
nashmou 0 Report post Posted July 5, 2006 thx, now i know how i can do it. Share this post Link to post Share on other sites
Hadi 0 Report post Posted July 5, 2006 Thank you for this tutorial you can make a small code that verifies if the email is in the correct form for example: Email must be in this form : something@domain.com And everyone who enters an email not in this format, then that message will comeup. Now the problem is that I don't know what is this code, but I think you can find it by googling. Share this post Link to post Share on other sites
Sprnknwn 0 Report post Posted July 5, 2006 Thanks, it?s basic but I appreciate it, since the ones I?ve done are just made by copying and replacing things. Hopefully this will help me to understand things. Share this post Link to post Share on other sites
tphilakone 0 Report post Posted July 5, 2006 thank you very much Share this post Link to post Share on other sites
grimmy 0 Report post Posted July 5, 2006 thats nice but im sure ive seen that code somwhere Share this post Link to post Share on other sites
NeOniX 0 Report post Posted July 7, 2006 Well, i did something similar, but definately decided not to send to an email address, cuz it sometimes went to Spam folder, or strange things, my Feedback Form (wroted weeks ago) putted the output into an html file so you could read it wherever you want, if it's on a pub server.Here is the topic of my tutorial. Share this post Link to post Share on other sites
Dooga 0 Report post Posted July 7, 2006 That's nice! I don't really like using the complicated form.phps that you can find in hotscripts.com or something. However, it doesn't seem like it has validation. Validation should be easy, just have something like if ($message=='') {echo "You didn't fill out the message";} Share this post Link to post Share on other sites
vicviqbe 0 Report post Posted July 18, 2006 Hello, I need a form to send e-mails, but that is not created in PHP, but I need it for JSP. It would thank for the aid to them that can offer me, since it is necessary for a project of the university. Share this post Link to post Share on other sites
Florisjuh 0 Report post Posted July 19, 2006 Your script is okay but it lacks any kind of verification or security, so don't use this for any companny website becuase you'll easiliy be spammed to hell :> Share this post Link to post Share on other sites
uiop 0 Report post Posted July 19, 2006 Indeed .You might also want to strip out HTML tags. Share this post Link to post Share on other sites
delivi 0 Report post Posted July 19, 2006 thanks dude for the codings. This was helpful. Share this post Link to post Share on other sites
pandacakes 0 Report post Posted July 19, 2006 Oh, thanks for that script! I've been looking for something simple like that for a long time. Every script I found through Google was so dang complicated! Thanks! Share this post Link to post Share on other sites
bunnidelight 0 Report post Posted July 25, 2006 (edited) Is there one for umm HTML??? Edited July 25, 2006 by bunnidelight (see edit history) Share this post Link to post Share on other sites
iGuest 3 Report post Posted December 9, 2009 If you don't have time to mess with code, you might want to try http://forums.xisto.com/no_longer_exists/. I found it pretty flexible for feedback forms and easy to setup. -reply by Mike Share this post Link to post Share on other sites