 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
lazybunny
Joined: 10 Nov 2008 Posts: 2
|
Posted: Mon Nov 10, 2008 2:13 pm Email Form Errors |
|
|
|
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: 1417 Location: Biloxi, MS
|
Posted: Fri Nov 14, 2008 10:26 pm |
|
|
|
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: 20
|
Posted: Tue Nov 18, 2008 8:29 am Search Google for "Simple email form" |
|
|
|
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: 1417 Location: Biloxi, MS
|
Posted: Wed Nov 19, 2008 6:47 am |
|
|
|
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]. |
|
|
|
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
|
|
|
|
|
 |
|
|
|
|
|
|
|