Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: allow form to be sent to me using an email address submitted by guest  (Read 3477 times)

0 Members and 1 Guest are viewing this topic.

silante

  • Guest
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.

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: allow form to be sent to me using an email address submitted by guest
« Reply #1 on: December 07, 2010, 10:44:24 AM »
So you want the user to be able to specify the email address the form data is sent to?

rockerest



    Hopeful
    • Yes
  • Experience: Experienced
  • OS: Windows 7
Re: allow form to be sent to me using an email address submitted by guest
« Reply #2 on: December 29, 2010, 10:42:14 PM »
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
In general, the PEBKAC.  Whether it's now or was three weeks ago, the PEBKAC.
Unsafe browsing and general computer / internet illiteracy IS the users problem.  Don't have sex if you don't know how to use a condom.
Also, there are 10 types of people in the world, those who understand binary, and those who don't.

kpac

  • Web moderator
  • Moderator


  • Hacker

  • kpac®
  • Thanked: 184
    • Yes
    • Yes
    • Yes
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 7
Re: allow form to be sent to me using an email address submitted by guest
« Reply #3 on: December 30, 2010, 05:13:47 AM »
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>