I need an email form where the user can specify the email address the message is sent to, who it's sent from and the email subject?
Is this possible? If so, how? Thank you.
I need an email form where the user can specify the email address the message is sent to, who it's sent from and the email subject?
Is this possible? If so, how? Thank you.
all that but no message?
Code:<form name="something" action="/somewhere.php" method="post"> <p> <label>To:</label> <input type="text" name="recipient" value=""> </p> <p> <label>From:</label> <input type="text" name="from" value=""> </p> <p> <label>Subject:</label> <input type="text" name="subject" value=""> </p> </form>
Oh yeah, and a message field please?
change theCode:<form name="something" action="/somewhere.php" method="post"> <p> <label>To:</label> <input type="text" name="recipient" value=""> </p> <p> <label>From:</label> <input type="text" name="from" value=""> </p> <p> <label>Subject:</label> <input type="text" name="subject" value=""> </p> <p> <label>Message:</label> <textarea name="message" cols="20" rows="5"></textarea> </p> <p> <input type="submit" name="submitBtn" value="Send Email"> </p> </form>colsvalue to the number of columns (width) you would like the box to appear on screen
change therowsvalue to the number of rows (height) you want the box to appear on screen
all that above is the html portion, that will only be what the user sees, you need another page, which in this form i have dubbed "somewhere.php" that will process the values and send the email. Check with your ISP (Website Host) to see if they support php... chances are they do, but some hosts don't allow it
if your host doesnt allow it... find out what type of mailing system they do support and let us know.
if you want to add any additional 1 line fields, just use the convention below
to add a multiple line text field like the message, useCode:<p> <label>NAME_OF_FIELD</label> <input type="text" name="NAME_OF_FIELD" value=""> </p>
Code:<p> <label>NAME_OF_FIELD</label> <textarea name="NAME_OF_FIELD" cols="20" rows="5"></textarea> </p>
I wrote a script a couple weeks ago that will do all of these things for you. It generates the html of the form, the javascript to validate it, and the php to send it. Assuming you have access to an editor it should be pretty easy for you. http://www.designforjoe.com/tester.php
i see a couple errors:
<form action="mail_form.php" method="post"> onSubmit " var the_result="checkMandatory(); return the_result;"
...
<label for "email" ="Email: ">
also the javascript validation is good, but if javascript is disabled, they could send as many blank emails as they wanted. try php validation too. if you fix some of the more malignant errors, it could be very useful.![]()
[Jasme Library (Javascript Motion Effects)] My Site
/\/\@§†ê® §©®¡þ† /\/\@|{ê®
There are 10 kinds of people in the world, those that understand binary and those that don't.
Thanks for the advice on the form script - I will fix the noted bugs. I'll work up a server-side validation for it as well, although it will be a bit lenghtier.![]()
Bookmarks