Lissa Explains it All:  Web Design Forums  

Go Back   Lissa Explains it All: Web Design Forums > LEIA Archives > Web Site Help > HTML Help

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 01-04-2006, 06:04 PM
PotaTo PotaTo is offline
n00bzilla
 
Join Date: Dec 2005
Posts: 10
PotaTo is on a distinguished road
Exclamation Confirmation page for e-mail form?

Hi, how could I make a confirmation page for my e-mail form so that after a user clicks "Submit", they will automatically be redirected to a confirmation page confirming that their e-mail was sent successfully? I need to know how to automatically redirect to another page after "Submit" is clicked.

This is the coding I have so far for my e-mail form page. I do not know if it works, I have never used e-mail forms before, so please correect my coding for me if any is wrong.

Quote:
<html>
<head>
<title>LP Aboveground</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE type="text/css">
a:active{color:#444444; }
a:hover{color:#626262; }
<!--
BODY {
scrollbar-face-color:#201C18;
scrollbar-highlight-color:#201C18;
scrollbar-3dlight-color:#201C18;
scrollbar-darkshadow-color:#201C18;
scrollbar-shadow-color:#201C18;
scrollbar-arrow-color:#504038;
scrollbar-track-color:#494036;
}
-->
</STYLE>
</head>

<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="http://www.lpaboveground.kylosa.com/image_22.gif" text="#666666" bgproperties="fixed">
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link=#444444 vlink=#444444>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<A name="top"></A>
<b>[--<u>contact</u>--]</b><br>
<br>
------------------------------------------------------------<br>
<br>
<form method="post" enctype="text/plain" action='mailto:edwardto@lpaboveground.com'>
<input type="hidden" name="To" value="LP Aboveground">
<input type="hidden" name="next" value="http://www.lpaboveground.kylosa.com/confirmation.htm">
<b>Name:</b><br>
<input type="text" name="Name:" size="50" maxlength="100"><br>
<br>
<b>E-mail Address:</b><br>
<input type="text" name="E-mail Address:" size="50" maxlength="100"><br>
<br>
<b>Message:</b><br>
<textarea name="Message:" rows=5 cols=38></textarea><br>
<br>
<input type="submit" value="Submit"><img src="spacer.gif" width=5 height=1 alt="spacer">
<input type="reset" value="Reset"></form>
</font>
</body>
</html>
Thanks a bunch.
Reply With Quote
  #2  
Old 01-04-2006, 06:14 PM
Paco Paco is offline
blah
 
Join Date: May 2005
Location: Its all in your mind, I'm not
Posts: 1,777
Paco is on a distinguished road
I dont know how to do it in HTML, but I do know how to using php, would you like that?
__________________
Brummm

Reply With Quote
  #3  
Old 01-04-2006, 06:18 PM
Douglas's Avatar
Douglas Douglas is offline
eL33T
 
Join Date: Mar 2005
Location: BC, Canada
Posts: 4,750
Douglas is a jewel in the roughDouglas is a jewel in the roughDouglas is a jewel in the rough
Kier will help you, but just a side not, HTML can't tell if the email was successfully sent or not, HTML doesn't send the email, the mail client on the computer sends the mail, using a programming language, like kier will probably show you, will actually send the email from the script
__________________
Ne jamais mangez la neige jaune.
Reply With Quote
  #4  
Old 01-04-2006, 06:33 PM
Paco Paco is offline
blah
 
Join Date: May 2005
Location: Its all in your mind, I'm not
Posts: 1,777
Paco is on a distinguished road
As I've got to do something I'll post what to do now for you.

Put this where you want your form to be.

PHP Code:
<center><form action="sendmail.php" method="post"><p><br /><input type="text" value="Name" name="subject" /> Sender:<br /><input type="text" value="Email" name="sender" /> Message:<br /><textarea cols="25" rows="10" name="message">Your message here.</textarea> <input type="submit" value="Send" /> </p> </form></center
Then open notepad and save it as sendmail.php
PHP Code:
<?php

// sendmail.php file



$subject $_POST['subject'];

$sender $_POST['email'];

$message $_POST['message'];

$message=$message."\nThis message was sent by: ".$sender;



// Send

if (mail("Your Email address here"$subject$message)) {

?>

You have sent this email message:<br />

<?php

echo $message;

}

else {

?>

Error sending mail.

<?php

}

?>
You will need to change some of the stuff like Email and the message at the end.

If you gave any questions just ask.
__________________
Brummm


Last edited by kier; 01-04-2006 at 06:37 PM.
Reply With Quote
  #5  
Old 01-04-2006, 07:58 PM
PotaTo PotaTo is offline
n00bzilla
 
Join Date: Dec 2005
Posts: 10
PotaTo is on a distinguished road
Could you explain more in-depth please? I am not familiar with PHP at all, although I would really like to learn; I've seen some really awesome scripts which I really want to use.

Thanks
Reply With Quote
  #6  
Old 01-05-2006, 07:05 AM
Paco Paco is offline
blah
 
Join Date: May 2005
Location: Its all in your mind, I'm not
Posts: 1,777
Paco is on a distinguished road
What you need to do is.

Put this code here you want the form to be.
HTML Code:
<center><form action="sendmail.php" method="post"><p><br /><input type="text" value="Name" name="subject" /> Sender:<br /><input type="text" value="Email" name="sender" /> Message:<br /><textarea cols="25" rows="10" name="message">Your message here.</textarea> <input type="submit" value="Send" /> </p> </form></center>
Then open notepad and save this as sendmail.php
PHP Code:
<?php

// sendmail.php file



$subject $_POST['subject'];

$sender $_POST['email'];

$message $_POST['message'];

$message=$message."\nThis message was sent by: ".$sender;



// Send

if (mail("Your Email address here"$subject$message)) {

?>

You have sent this email message:<br />

<?php

echo $message;

}

else {

?>

Error sending mail.

<?php

}

?>
Then just put your email in and change

Quote:
You have sent this email message:
To what ever you want.

Then upload it and it will work.

Thats really all there is.
__________________
Brummm

Reply With Quote
  #7  
Old 01-07-2006, 01:14 AM
PotaTo PotaTo is offline
n00bzilla
 
Join Date: Dec 2005
Posts: 10
PotaTo is on a distinguished road
Ok, I've decided that I don't want to use PHP. Thanks for all the help anyway though Kier.

I just want to use plain HTML, so all I really need to know is how to redirect a user to another URL when he/she clicks "Submit". I will be using the built-in browser e-mail.

Thanks .
Reply With Quote
  #8  
Old 01-07-2006, 01:26 AM
Douglas's Avatar
Douglas Douglas is offline
eL33T
 
Join Date: Mar 2005
Location: BC, Canada
Posts: 4,750
Douglas is a jewel in the roughDouglas is a jewel in the roughDouglas is a jewel in the rough
Use this:

HTML Code:
<html>
<head>
<title>LP Aboveground</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<STYLE type="text/css">
a:active{color:#444444; }
a:hover{color:#626262; }
<!--
BODY {
scrollbar-face-color:#201C18;
scrollbar-highlight-color:#201C18;
scrollbar-3dlight-color:#201C18;
scrollbar-darkshadow-color:#201C18;
scrollbar-shadow-color:#201C18;
scrollbar-arrow-color:#504038;
scrollbar-track-color:#494036;
}
-->
</STYLE>
</head>

<script language="JavaScript" type="text/javascript">
<!--;
function go_submit(url) {
document.email.submit();
window.location=url;
}
//-->
</script>

<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="http://www.lpaboveground.kylosa.com/image_22.gif" text="#666666" bgproperties="fixed">
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link=#444444 vlink=#444444>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<A name="top"></A>
<b>[--<u>contact</u>--]</b><br>
<br>
------------------------------------------------------------<br>
<br>
<form method="post" enctype="text/plain" action='mailto:edwardto@lpaboveground.com' name="email">
<input type="hidden" name="To" value="LP Aboveground">
<input type="hidden" name="next" value="http://www.lpaboveground.kylosa.com/confirmation.htm">
<b>Name:</b><br>
<input type="text" name="Name:" size="50" maxlength="100"><br>
<br>
<b>E-mail Address:</b><br>
<input type="text" name="E-mail Address:" size="50" maxlength="100"><br>
<br>
<b>Message:</b><br>
<textarea name="Message:" rows=5 cols=38></textarea><br>
<br>
<input type="button" onclick="javascript:go_submit('REDIRECT URL');" value="Submit"><img src="spacer.gif" width=5 height=1 alt="spacer">
<input type="reset" value="Reset"></form>
</font>
</body>
</html> 
Something like that will work
__________________
Ne jamais mangez la neige jaune.
Reply With Quote
  #9  
Old 01-07-2006, 03:33 AM
PotaTo PotaTo is offline
n00bzilla
 
Join Date: Dec 2005
Posts: 10
PotaTo is on a distinguished road
Could you please make it able to transfer into an iFrame please?

Thanks a bunch .
Reply With Quote
  #10  
Old 01-07-2006, 09:26 PM
Edward To Edward To is offline
n00bzilla
 
Join Date: Jan 2006
Posts: 17
Edward To is on a distinguished road
Ok, I'm really sorry, but... could you make it actually PHP instead of HTML again? Many people cannot send an e-mail when they use their browser's e-mail service either because they do not know how to set POP3, or either because their host does not allowe them to.

This is the coding I have for my Contact Form page:
Quote:
<html>
<head>
<title>LP Aboveground</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
input, textarea { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10 px; color: #56524A; text-decoration: none; background-color: #303030; border-color: black black black; border-style: outset; border-top-width: 1 px; border-right-width: 1 px; border-bottom-width: 1 px; border-left-width: 1 px
}
a:active{color:#444444; }
a:hover{color:#626262; }
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color:#201C18;
scrollbar-highlight-color:#201C18;
scrollbar-3dlight-color:#201C18;
scrollbar-darkshadow-color:#201C18;
scrollbar-shadow-color:#201C18;
scrollbar-arrow-color:#504038;
scrollbar-track-color:#494036;
}
-->
</style>
</head>

<script language="JavaScript" type="text/javascript">
<!--;
function go_submit(url) {
document.email.submit();
window.location=url;
}
//-->
</script>

<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="http://www.lpaboveground.kylosa.com/image_22.gif" text="#666666" bgproperties="fixed">
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link=#444444 vlink=#444444>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<A name="top"></A>
<b>[--<u>contact</u>--]</b><br>
<br>
------------------------------------------------------------<br>
<br>
<form method="post" enctype="text/plain" action='mailto:edwardto@lpaboveground.com' name="email">
<input type="hidden" name="Subject" value="LP Aboveground">
<b>Name:</b><br>
<input type="text" name="Name" size="50" maxlength="100"><br>
<br>
<b>E-mail Address:</b><br>
<input type="text" name="E-mail Address" size="50" maxlength="100"><br>
<br>
<b>Message:</b><br>
<textarea name="Message" rows=5 cols=50></textarea><br>
<br>
<input type="button" onclick="javascript:go_submit('http://www.lpaboveground.kylosa.com/confirmation.htm');" value="Send"></form>
</font>
</body>
</html>
And this is the coding I have for my Confirmation page
Quote:
<html>
<head>
<title>LP Aboveground</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
input { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10 px; color: #56524A; text-decoration: none; background-color: #303030; border-color: black black black; border-style: outset; border-top-width: 1 px; border-right-width: 1 px; border-bottom-width: 1 px; border-left-width: 1 px
}
a:active{color:#444444; }
a:hover{color:#626262; }
<STYLE type="text/css">
<!--
BODY {
scrollbar-face-color:#201C18;
scrollbar-highlight-color:#201C18;
scrollbar-3dlight-color:#201C18;
scrollbar-darkshadow-color:#201C18;
scrollbar-shadow-color:#201C18;
scrollbar-arrow-color:#504038;
scrollbar-track-color:#494036;
}
-->
</style>
</head>

<body LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="http://www.lpaboveground.kylosa.com/image_22.gif" text="#666666" bgproperties="fixed">
<BODY BGCOLOR=#000000 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 link=#444444 vlink=#444444>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<A name="top"></A>
<b>[--<u>contact</u>--]</b><br>
<br>
------------------------------------------------------------<br>
<br>
Thank you, an attempt to send your message has been made. If a response is not issued within 24 hours, then an error has most likely occurred.</font>
</body>
</html>
Please copy and paste those somewhere so you can get a preview of what I want the PHP version to look like. Or you could go to http://www.lpaboveground.com/ and click "contact" in the nav bar. You must use Internet Explorer or else it will look very messed up.

Thank you so much .
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Form Processor Not Working bourdelson Advanced Programming 3 12-30-2004 04:52 PM
how do i create a form so peolple can mail me (like with a fill in the box, or with.. KeLs HTML Help 3 12-28-2004 08:20 PM
Mail Form Script inuyashateen113 Advanced Programming 3 12-26-2004 10:57 PM
Mail Form Jared Advanced Programming 3 12-24-2004 04:44 PM
'Mail this page to a friend' soo_gurl JavaScript/DHTML 1 05-12-2003 07:14 PM


All times are GMT. The time now is 07:33 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.