|
Answer» I have my form set up to submit to my email ADDRESS. When sumbit is clicked outlook express, or whatever default software the guest would have, opens. I want the form to be able to be sent to me from a an email address that the guest would enter into the form.
This is the code I have so far.
Code: [Select]<form align= "left" action= "mailto:[email protected]"> Your Name: <br> <INPUT type="text" name="Name" value="Not your real name" size="20" maxlength= "50" onfocus=value=''"> <br><br> Your Email: <br> <input type="text" size= "20" maxlength= "50"> <br><br> Business Name <br> <input type="text" size= "20" maxlength= "50"> <br><br> Business Address: <br> <textarea wrap= "virtual" name= "address" rows= 3 cols= 20 maxlength= 100> </textarea><br><br> Business Phone #: <br> <input type="text" size= "20" maxlength= "12"> <br><br> Rate Your Experience: <br> <select size= "1"> <option> 1 <option> 2 <option> 3 <option> 4 <option> 5 <option> 6 <option> 7 <option> 8 <option> 9 <option> 10 </select> <br><br> Describe your experience. <br> <textarea wrap= "virtual" name= "review" rows= 10 cols= 50 maxlength= 500> </textarea><br><br> <input type= "submit" value= "Submit Review"> <input type= "reset" value= "Start Over"> </form>
I want the process of submitting a consumer review to be as simple as possible. I want to be able to receive the review without the guest having to write an email. Also, I want it to be able to work in desktop and mobile browsers. I would really appreciate any help or ADVICE I can get. Thanks.So you want the user to be able to specify the email address the form data is sent to?Sorry for the big bump here, but what I *think* the question is, is: "How do I have an email form on my website that sends an email to me, without using the user's email client, but still allows me to "REPLY" to the message and have them receive it?"
Well, it's not TOO complicated, but the short answer is:
"mailto:" will always try to open the user's email client. What you're trying to do requires server-side scripting.
Quick run-through:
User submits form- Server processes form and email address- Server emails you "pretending" to be the user's email address- - Profit-
Basically, you need PHP or (SHUDDER) ASP.
-rock
Code: [Select]<html> <body> <?php if (isset($_REQUEST['email'])) //if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; mail( "[email protected]", "Subject: $subject", $message, "From: $email" ); echo "Thank you for using our mail form"; } else //if "email" is not filled out, display the form { echo "<form method='post' action='" . $_SERVER['PHP SELF'] . "'> Email: <input name='email' type='text' /><br /> Subject: <input name='subject' type='text' /><br /> Message:<br /> <textarea name='message' rows='15' cols='40'> </textarea><br /> <input type='submit' /> </form>"; } ?> </body> </html>
|