Jump to content



Welcome to KnowledgeSutra - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!
- - - - -

Destination Address For "submit" Button


12 replies to this topic

#1 tomt491

    Newbie

  • Kontributors
  • Pip
  • 4 posts

Posted 01 September 2008 - 07:15 PM

I discovered this site while searching for an answer on what HTML code to use to print a web page. "Skymonkey" provided the answer to a similar question posed back in 2005. I now have another question about submitting a web page with fill in blanks.

Is there an easy HTML code that can include a destination address to a "Submit" button without having to use Javascript? I have created a form with fill in blanks and now want to have people simply hit the Submit button to send their information to a particular email address.

Thanks for any help.
Tom T.

#2 jlhaslip

    Insert Custom Title Here

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,040 posts
  • Gender:Not Telling
  • Location:Linux, DOS and Windows…the good, the bad and the ugly
  • myCENT:81.07
  • Spam Patrol

Posted 01 September 2008 - 07:56 PM

Sounds to me like you require the use of a "mailto" action (or a Contact Form).

Mailto will pop-up the user's Mail Client (Outlook, Thunderbird, etc) that is installed on their machine. A contact Form would require some php coding.

Are you comfortable with PHP? Do you have a Hosting account which allows the use of the PHP Mail function?

Trap17 allows the mail() on their Hosting Accounts. Make some good posts, apply for an Account and someone will likely assist you with the code.
*Possibly even write the bulk of it for you.*

(reaches into his php folder... ) :)

#3 shadowx

    Live your life so that in death you may stand side by side with your gods. Not at their feet.

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1,674 posts
  • Gender:Male
  • Location:Essex, UK
  • Interests:Photography is a big interest, i have some photos up at my site, apex photographs (http://apex-photographs.com). Using my Lumix g1 to take the photos of course! <br /><br />Um computer games... photo editing and thats about it!
  • myCENT:68.57
  • Spam Patrol

Posted 01 September 2008 - 08:28 PM

Quote

*Possibly even write the bulk of it for you.*

(reaches into his php folder...

Not if i beat ya to it :)

As jlhaslip said, PHP is probably the best and easiest way to do this, assuming you know PHP (PHP is a back end, server side coding language, no PHP code is ever shown to the user, it is run like a program on the hosting server and then the user sees the output, eg "Email sent" not the code)

with php you would write a new file and then link it to the submit button using the form's "action" attribute eg: action=email.php

As jlhaslip also said you can use the basic HTML mailto: link with additional details, but this is apparently unreliable and not very browser compatible. So the best route is the PHP one, if you need a script then there are a good few PHP coders on the forums that can write one for you in a few minutes so just ask :)

#4 galexcd

    Trap Grand Marshal Member

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPip
  • 1,331 posts
  • Gender:Not Telling
  • myCENT:39.82

Posted 01 September 2008 - 09:16 PM

View Postshadowx, on Sep 1 2008, 01:28 PM, said:

there are a good few PHP coders on the forums that can write one for you in a few minutes so just ask :)

No need to ask, I just whipped one up for you right now. You can either use it as it is or use it as an example on how to make one yourself. This code is not a complete page, just the portion that displays the submit button and fields, that way you are able to insert it into any page you want with a simple copy and paste:

<? //enter recipient's email address.  If multiple recipients, separate with comma:
$to="someemail@yourdomain.com";
if(isset($_POST['email'])){
if(ereg("^[^@]{1,64}@[^@]{1,200}\.[a-zA-Z]{2,3}$",$_POST['email'])){
mail($to,$_POST['subject'],$_POST['message'],"From: ".$_POST['email']);
echo'<font color="green">Your message was sent</font>';
}else echo'<font color="red">"'.$_POST['email'].'" is not a valid email address.</font>';
}
?><form action="" method="post"><table><tr><td>Your Email:</td><td><input name="email"></td></tr>
<tr><td>Subject:</td><td><input name="subject"></td></tr></table>Message:
<br><textarea rows="8" cols="50" name="message"></textarea><br>
<input type="submit" value="send"></form>


#5 jlhaslip

    Insert Custom Title Here

  • [MODERATOR]
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,040 posts
  • Gender:Not Telling
  • Location:Linux, DOS and Windows…the good, the bad and the ugly
  • myCENT:81.07
  • Spam Patrol

Posted 01 September 2008 - 10:12 PM

http://www.jlhaslip....x_form_mail.php

Try this as a "questionaire" form that will email you the results.

Styling is a blend of several templates, but it can be made pretty very quickly.

#6 tomt491

    Newbie

  • Kontributors
  • Pip
  • 4 posts

Posted 02 September 2008 - 12:14 AM

Thanks to all of you who responded to my question about adding a destination address to a "Submit" button. I'm designing a web page for a conference in which people will be able to fill in the blanks on a web page, print the page out on their printer, then mail it along with their registration fees to the Registrar. I don't believe the group is going to be able to handle Internet registrations using the "Submit" button option, but I just wanted to learn how to do it for the future.

This group has already taught me a few new things about HTML coding and I'm going to enjoy taking part in the forums.

Thanks again,

Tom T.

#7 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 09 June 2009 - 10:16 PM

Submit buttonDestination Address For "submit" Button

hi..

My question is when I pess the submit button I want the information that has been filled into the form to be sent to a particular email address..

Can anyone help me please??? 

-question by Hols

 



#8 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 27 November 2009 - 11:24 AM

how to link a email ID to a submit ButtonDestination Address For "submit" Button

how to link a email ID to a submit Button.I have prepared a request form with various fields and I want to link these details to a particular mail ID when the submit button is clicked.Please some one help me out in this.

-question by sowmya

#9 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 19 January 2010 - 05:16 PM

php questionDestination Address For "submit" Button

Hello

I'm using this code to make a contact form page

 

<? //enter recipient's email address. If multiple recipients, separate with comma:$to="someemail@yourdomain.Com";If(isset($_POST['email'])){If(ereg("^[^@]{1,64}@[^@]{1,200}.[a-zA-Z]{2,3}$",$_POST['email'])){Mail($to,$_POST['subject'],$_POST['message'],"From: ".$_POST['email']);Echo'<font color="green">Your message was sent</font>';}else echo'<font color="red">"'.$_POST['email'].'" is not a valid email address.</font>';}?><form action="" method="post"><table><tr><td>Your Email:</td><td><input name="email"></td></tr><tr><td>Subject:</td><td><input name="subject"></td></tr></table>Message:<br><textarea rows="8" cols="50" name="message"></textarea><br><input type="submit" value="send"></form> 

 

everyting is perfect wtih the page but I want to add more text areas&input to it , I have put them in ex: First name - Last name ... Etc

 

when trying to add them to this line

mail($to,$_POST['subject'],$_POST['message'],"From: ".$_POST['email']);

If you see $_POST['message'] it's working fine and delivering to the mail , how can I add more value's to it , example ['L_name'] or anything else to be delivery through the mail .

 

Best Regards

Khaled Mohaissen

-question by Khaled Mohaissen

#10 iGuest

    Hail Caesar!

  • Kontributors
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 5,876 posts
  • Interests:Trap17 Free Web Hosting, No Ads

Posted 03 March 2010 - 05:50 AM

Submit button>>to >> EmailDestination Address For "submit" Button

I have same problem

I have form code.

I have emailTemplate

I have thanks to submission page

I have php code for submit

..But I don't know how toArrange them to work,,  when I upload all data.. When I press SubmitButton ..I'll receive the download promp for my PhP files :(  and noRedirect to thanks page .

 I want when visitor fill the form , and press submit ..  all filled information send to my email address andVisitor redirect to Thanks.Html pages.

2 notes:

1-Do I needTo have a temp mail sender? something that I give one Email username and mail password (SMTP)  then php code will login to Temp email .. CopyFilled information from fom to compose part then send to my DestinationEmail

2- is it necessary to have Data base for my purpose?

Warm Regards

 

 

-reply by Amin




Reply to this topic


This post will need approval from a moderator before this post is shown.

  


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users