| | |
How do i make a form that doesn't open the e-mail client?
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
i've made a website with a contact form, but everytime you click the send button it opens the computer default e-mail client. i know there is a way of doing this, but i dont know how.
I think it involves php and if it does can somebody show me how to do it, in simple terms (because i'm new to php),
Need help ASAP please
I think it involves php and if it does can somebody show me how to do it, in simple terms (because i'm new to php),
HTML and CSS Syntax (Toggle Plain Text)
<form action="mailto:mail@address.com" method="post" name="contact" id="contact"> <table width="648" border="0" align="center"> <tr> <td width="329" align="right"><div align="right">Title:</div></td> <td width="10" align="right"> </td> <td width="300"><div align="left"> <select name="title" id="title"> <option>-- Select One --</option> <option>Mr</option> <option>Mrs</option> <option>Miss</option> <option>Ms</option> </select> </div></td> </tr> <tr> <td align="right"><div align="right">First Name:</div></td> <td align="right"> </td> <td><div align="left"> <input type="text" name="firstName" id="firstName"> </div></td> </tr> <tr> <td align="right"><div align="right">Last Name:</div></td> <td align="right"> </td> <td align="left"><div align="left"> <input type="text" name="lastName" id="lastName"> </div></td> </tr> <tr> <td align="right"> </td> <td align="right"> </td> <td> </td> </tr> <tr> <td align="right"><div align="right">Telephone:</div></td> <td align="right"> </td> <td><div align="left"> <input name="phone" type="text" id="phone" size="51"> </div></td> </tr> <tr> <td align="right"><p align="right">E-Mail:</p></td> <td align="right"> </td> <td><div align="left"> <input name="e-mail" type="text" id="e-mail" size="51"> </div></td> </tr> <tr> <td align="right"><div align="right"></div></td> <td align="right"> </td> <td><div align="left"></div></td> </tr> <tr> <td align="right"><div align="right">Reason for Contacting:</div></td> <td align="right"> </td> <td><div align="left"> <select name="reason" id="reason"> <option>-- Select One --</option> <option>General Enquiry</option> <option>Tips</option> <option>Commisioning</option> <option>Website Fault</option> </select> </div></td> </tr> <tr> <td align="right"><div align="right"></div></td> <td align="right"> </td> <td><div align="left"></div></td> </tr> <tr> <td align="right" valign="top"><div align="right">Enquiry:</div></td> <td align="right"> </td> <td><div align="left"> <textarea name="enquiry" cols="48" rows="5" wrap="physical" id="enquiry"></textarea> </div></td> </tr> <tr> <td align="right" valign="top"><div align="right"> <input type="submit" name="send" id="send" value="Send" a href="Contact.html" onClick="alert("You will now be redirected to your e-mail client")"> </div></td> <td align="right"> </td> <td><div align="left"> <input type="reset" name="clear" id="clear" value="Clear"> </div></td> </tr> </table> <label></label> <p> <label></label> </p> </form>
Need help ASAP please
You can do it pretty easily in PHP with the mail() function. To do this though you would need to change the action attribute on your form tag to your PHP script. Then construct the message in PHP and use the mail() function to send it. For more on mail() see W3Schools and the PHP.net Reference.
•
•
Join Date: Oct 2006
Posts: 19
Reputation:
Solved Threads: 0
You'd need to change your line to
the php code is in a separate file, a text file is what i use.
If you happen to host the site on godaddy, then have a basic php form already written and ready to use.
Otherwise you can start here
http://www.w3schools.com/php/php_forms.asp
HTML and CSS Syntax (Toggle Plain Text)
<form action="filename.php" method="post" name="contact" id="contact">
the php code is in a separate file, a text file is what i use.
If you happen to host the site on godaddy, then have a basic php form already written and ready to use.
Otherwise you can start here
http://www.w3schools.com/php/php_forms.asp
![]() |
Similar Threads
- form to mail problem (HTML and CSS)
- form to mail problem (PHP)
- How to check if form is open (Visual Basic 4 / 5 / 6)
- Mail client that supports prodigy.net (Mac Software)
- Make a form unable(or get expired) after particular duration (Visual Basic 4 / 5 / 6)
- By Pressing F3 on MDI Form(Parent) How can a sub menu Form will open (Visual Basic 4 / 5 / 6)
- Mail Client (PHP)
- how do i make a form that actually works? (HTML and CSS)
- How do I choose my default mail client? (OS X)
Other Threads in the HTML and CSS Forum
- Previous Thread: Checklist for CSS problems
- Next Thread: multi column lists
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






