| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Destination Address For "submit" Button
#1
Posted 01 September 2008 - 07:15 PM
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
Posted 01 September 2008 - 07:56 PM
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
Posted 01 September 2008 - 08:28 PM
Quote
(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
Posted 01 September 2008 - 09:16 PM
shadowx, on Sep 1 2008, 01:28 PM, said:
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
Posted 01 September 2008 - 10:12 PM
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
Posted 02 September 2008 - 12:14 AM
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.
#8
Posted 27 November 2009 - 11:24 AM
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
Posted 19 January 2010 - 05:16 PM
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
Posted 03 March 2010 - 05:50 AM
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

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users














