HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Email Form Errors
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
lazybunny



Joined: 10 Nov 2008
Posts: 2

PostPosted: Mon Nov 10, 2008 2:13 pm     Email Form Errors Reply with quote

I am trying to create a simple mailto form, where my website users can email me and the information goes directly to my email inbox. Simple, right?

This is my code:

Quote:
<form id="form1" enctype="text/html" method="post" action="mailto:hiccupatlazy-bunny.com">
<p>Name
<input type="text" name="textfield" />
</p>
<p>Email
<input type="text" name="textfield2" />
</p>
<p>Comment
<textarea name="textarea"></textarea>
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>


However, when I go to try this form out, I'm redirected to google mail. I'm slowly being driven insane by this, and I have a feeling that it's a stupidily simple solution. Can someone help?

Thankyou!
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1274
Location: Biloxi, MS

PostPosted: Fri Nov 14, 2008 10:26 pm     Reply with quote

Can't do it with a "mailto:" as that opens the client-side email program if coded correctly. You need a php form processing file to process a proper contact/email me form.

Code:
<div style="width: 400px; margin: 0 auto; border: 1px solid #0f0;">
<form method="post" action="mailto:someone@$nailmail.com" enctype="text/plain">
<p>NAME: <input type="text" name="username"></p>
<p>EMAIL: <input type="text" name="email"></p>
<p>COMMENTS:<br>

<textarea name="comments" rows="10" cols="46">
</textarea></p>

<p><input name="redirect" type="hidden" value="index.html"></p>
<p><input name="next_url" type="hidden" value="index.html"></p>
<p><input type="submit" value="Send"> <input type="reset" value="Clear"></p>
</form>
</div>
<!-- END OF FORM -->


UPDATE: Forgot to mention that your action="" is not correct. Look at example given to properly get an email action.


Last edited by PayneLess Designs on Wed Nov 19, 2008 6:44 am; edited 1 time in total
Tom Andersen



Joined: 18 Nov 2008
Posts: 18

PostPosted: Tue Nov 18, 2008 8:29 am     Search Google for "Simple email form" Reply with quote

For a simple form script like the one you have visit here for tutorial and code:

How to make a simple form

Hope this helps
PayneLess Designs



Joined: 28 Feb 2007
Posts: 1274
Location: Biloxi, MS

PostPosted: Wed Nov 19, 2008 6:47 am     Reply with quote

A much better form maker I use a lot is at http://www.thesitewizard.com/wizards/feedbackform.shtml .Just follow the directions and you can make a very good server-side form with two files. The PHP is done for you. Three files if you want a link to a Thank You page.

See the site's [url= http://www.thesitewizard.com/wizards/faq.shtml]FAQs[/url].
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial