Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Design Forum > HTML / CSS
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 12-29-2005, 02:59 AM   #1 (permalink)
toles
Member
 
Join Date: Dec 2005
Posts: 40
Default need help getting my form to redirect

I placed a submission form in my website that is supposed to send me the information submitted and then redirect to a Thank you page after it is submitted. Here is the link to the page and the html code:
http://www.lookstare.com/Submit.html

<html>

<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<meta HTTP-EQUIV="Content-Language" CONTENT="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Search Engine Submission</title>
</head>

<body>

<h1>SEARCH ENGINE SUBMISSION</h1>
<hr>

<form METHOD="POST" ACTION="mailto:sales@lookstare.com">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="sales@lookstare.com" B-Email-Label-Fields="TRUE"
S-Builtin-Fields U-Confirmation-Url="http://www.lookstare.com/Thankyou.htm"
-->
<ol>
<li>
<p>Please provide the following contact information:</p>
<table>
<tr>
<td ALIGN="right"><em>Name</em></td>
<td><input TYPE="TEXT" NAME="Contact_FullName" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Title</em></td>
<td><input TYPE="TEXT" NAME="Contact_Title" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Organization</em></td>
<td><input TYPE="TEXT" NAME="Contact_Organization" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Street Address</em></td>
<td><input TYPE="TEXT" NAME="Contact_StreetAddress" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Address (cont.)</em></td>
<td><input TYPE="TEXT" NAME="Contact_Address2" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>City</em></td>
<td><input TYPE="TEXT" NAME="Contact_City" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>State/Province</em></td>
<td><input TYPE="TEXT" NAME="Contact_State" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Zip/Postal Code</em></td>
<td><input TYPE="TEXT" NAME="Contact_ZipCode" SIZE="12" MAXLENGTH="12"></td>
</tr>
<tr>
<td ALIGN="right"><em>Country</em></td>
<td><input TYPE="TEXT" NAME="Contact_Country" SIZE="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>Work Phone</em></td>
<td><input TYPE="TEXT" NAME="Contact_WorkPhone" SIZE="25" MAXLENGTH="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>FAX</em></td>
<td><input TYPE="TEXT" NAME="Contact_FAX" SIZE="25" MAXLENGTH="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>E-mail</em></td>
<td><input TYPE="TEXT" NAME="Contact_Email" SIZE="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>URL</em></td>
<td><input TYPE="TEXT" NAME="Contact_URL" SIZE="25" MAXLENGTH="25"></td>
</tr>
</table>
</ol>
<input TYPE="SUBMIT" VALUE="Submit Form"> <input TYPE="RESET" VALUE="Reset Form">
</form>
<hr>
<h5>LookStare.com<br>
Copyright © 2005 [Abad Perez. All rights reserved.<br>
Revised: <!--webbot bot="TimeStamp" S-Type="EDITED" S-Format="%B %d, %Y" -->
</h5>
toles is offline   Reply With Quote
Sponsored Links
Old 12-29-2005, 11:54 AM   #2 (permalink)
Root
Junior Member
 
Join Date: Dec 2005
Posts: 20
Default

Quote:
Originally Posted by toles
I placed a submission form in my website that is supposed to send me the information submitted and then redirect to a Thank you page after it is submitted. Here is the link to the page and the html code:
http://www.lookstare.com/Submit.html

<html>

<head>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<meta HTTP-EQUIV="Content-Language" CONTENT="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Search Engine Submission</title>
</head>

<body>

<h1>SEARCH ENGINE SUBMISSION</h1>
<hr>

<form METHOD="POST" ACTION="mailto:sales@lookstare.com">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="sales@lookstare.com" B-Email-Label-Fields="TRUE"
S-Builtin-Fields U-Confirmation-Url="http://www.lookstare.com/Thankyou.htm"
-->
<ol>
<li>
<p>Please provide the following contact information:</p>
<table>
<tr>
<td ALIGN="right"><em>Name</em></td>
<td><input TYPE="TEXT" NAME="Contact_FullName" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Title</em></td>
<td><input TYPE="TEXT" NAME="Contact_Title" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Organization</em></td>
<td><input TYPE="TEXT" NAME="Contact_Organization" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Street Address</em></td>
<td><input TYPE="TEXT" NAME="Contact_StreetAddress" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Address (cont.)</em></td>
<td><input TYPE="TEXT" NAME="Contact_Address2" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>City</em></td>
<td><input TYPE="TEXT" NAME="Contact_City" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>State/Province</em></td>
<td><input TYPE="TEXT" NAME="Contact_State" SIZE="35"></td>
</tr>
<tr>
<td ALIGN="right"><em>Zip/Postal Code</em></td>
<td><input TYPE="TEXT" NAME="Contact_ZipCode" SIZE="12" MAXLENGTH="12"></td>
</tr>
<tr>
<td ALIGN="right"><em>Country</em></td>
<td><input TYPE="TEXT" NAME="Contact_Country" SIZE="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>Work Phone</em></td>
<td><input TYPE="TEXT" NAME="Contact_WorkPhone" SIZE="25" MAXLENGTH="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>FAX</em></td>
<td><input TYPE="TEXT" NAME="Contact_FAX" SIZE="25" MAXLENGTH="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>E-mail</em></td>
<td><input TYPE="TEXT" NAME="Contact_Email" SIZE="25"></td>
</tr>
<tr>
<td ALIGN="right"><em>URL</em></td>
<td><input TYPE="TEXT" NAME="Contact_URL" SIZE="25" MAXLENGTH="25"></td>
</tr>
</table>
</ol>
<input TYPE="SUBMIT" VALUE="Submit Form"> <input TYPE="RESET" VALUE="Reset Form">
</form>
<hr>
<h5>LookStare.com<br>
Copyright © 2005 [Abad Perez. All rights reserved.<br>
Revised: <!--webbot bot="TimeStamp" S-Type="EDITED" S-Format="%B %d, %Y" -->
</h5>


Maybe try using the php mail function.

Your Submission Page
Code:
<html> <head> <meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252"> <meta HTTP-EQUIV="Content-Language" CONTENT="en-us"> <meta name="GENERATOR" content="Microsoft FrontPage 4.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <title>Search Engine Submission</title> </head> <body> <h1>SEARCH ENGINE SUBMISSION</h1> <hr> <li> <p>Please provide the following contact information:</p> <table> <tr> <td ALIGN="right"><em>Name</em></td> <td><input TYPE="TEXT" NAME="Contact_FullName" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>Title</em></td> <td><input TYPE="TEXT" NAME="Contact_Title" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>Organization</em></td> <td><input TYPE="TEXT" NAME="Contact_Organization" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>Street Address</em></td> <td><input TYPE="TEXT" NAME="Contact_StreetAddress" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>Address (cont.)</em></td> <td><input TYPE="TEXT" NAME="Contact_Address2" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>City</em></td> <td><input TYPE="TEXT" NAME="Contact_City" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>State/Province</em></td> <td><input TYPE="TEXT" NAME="Contact_State" SIZE="35"></td> </tr> <tr> <td ALIGN="right"><em>Zip/Postal Code</em></td> <td><input TYPE="TEXT" NAME="Contact_ZipCode" SIZE="12" MAXLENGTH="12"></td> </tr> <tr> <td ALIGN="right"><em>Country</em></td> <td><input TYPE="TEXT" NAME="Contact_Country" SIZE="25"></td> </tr> <tr> <td ALIGN="right"><em>Work Phone</em></td> <td><input TYPE="TEXT" NAME="Contact_WorkPhone" SIZE="25" MAXLENGTH="25"></td> </tr> <tr> <td ALIGN="right"><em>FAX</em></td> <td><input TYPE="TEXT" NAME="Contact_FAX" SIZE="25" MAXLENGTH="25"></td> </tr> <tr> <td ALIGN="right"><em>Emai-l</em></td> <td><input TYPE="TEXT" NAME="Contact_Email" SIZE="25"></td> </tr> <tr> <td ALIGN="right"><em>URL</em></td> <td><input TYPE="TEXT" NAME="Contact_URL" SIZE="25" MAXLENGTH="25"></td> </tr> </table> </ol> <input TYPE="SUBMIT" VALUE="Submit Form"> <input TYPE="RESET" VALUE="Reset Form"> </form> <hr> <h5>LookStare.com<br> Copyright © 2005 [Abad Perez. All rights reserved.<br> Revised: <!--webbot bot="TimeStamp" S-Type="EDITED" S-Format="%B %d, %Y" --> </h5> </body> </html>

PHP Config File
Code:
//The email you wish the information to be sent to $webmaster = "Youremail@yourdomain.com"; //The subject you want the email to have $subject = "Somethinghere";

PHP Mail To
Code:
include('config.php'); $name = $_REQUEST['Contact_FullName']or die('Error, No Input'); $title = $_REQUEST['Contact_Title']or die('Error, No Input'); $organization = $_REQUEST['Contact_Organization']or die('Error, No Input'); $address = $_REQUEST['Contact_StreetAddress']or die('Error, No Input'); $address2 = $_REQUEST['Contact_Address2']; $city = $_REQUEST['Contact_City']or die('Error, No Input'); $state = $_REQUEST['Contact_State']or die('Error, No Input'); $zcode = $_REQUEST['Contact_ZipCode']or die('Error, No Input'); $country = $_REQUEST['Contact_Country']or die('Error, No Input'); $wphone = $_REQUEST['Contact_WorkPhone']or die('Error, No Input'); $fax = $_REQUEST['Contact_FAX']or die('Error, No Input'); $email = $_REQUEST['Contact_Email']or die('Error, No Input'); $url = $_REQUEST['Contact_URL']or die('Error, No Input'); $headers = "From: $email"; $body = "Name: $name \n Title: $title \n Organization: $organization \n Address: $address \n Address2: $address2 \n City: $city \n State/Province: $state \n Zip/Postal Code: $zcode \n Country: $country \n Work Phone: $wphone \n Fax: $fax \n Email: $email \n URL: $url"; mail($webmaster, $subject, $body, $headers); header("location: http://www.lookstare.com/Thankyou.htm"); ?>

Name the config file config.php and the PHP Mail To file send.php , upload them to your host (all in the same directory) and your done


Hope this help's
Root is offline   Reply With Quote
Old 12-29-2005, 02:45 PM   #3 (permalink)
proctor
Junior Member
 
Join Date: Oct 2005
Location: Annapolis, Maryland
Posts: 19
Default

Nice code ~Root

Will this help combat spam? I get alot of spam from my regular html email form.
proctor is offline   Reply With Quote
Old 01-02-2006, 02:30 AM   #4 (permalink)
cristobal
Senior Member
 
Join Date: Sep 2005
Posts: 219
Default

Maybe you can check the body before sending.
Something like

IF $body = "some kind of text"
{die;}

Or something like that.
cristobal is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 12:25 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums