PHP script redirect?

parttimetechie

New Member
Reaction score
0
Formmail. I found this site online and have run through the apropriate steps to get it working..I think, even though it takes forever to come into my Godaddy account.

I was wondering what code I need to change to allow a page to display which says something along the lines of thank you for submitting your response. Where would I find this code so I can change out what is there? Note: there is more PHP code, but I wanted to be able to fit this all in one post. Thanks for all the help to come :)

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="Business.css" />
<title>Wadsley Tech Services Appointments</title>
<meta name="title" content="Wadsley Tech Services" />
<meta name="keywords" content="computer help, computer geek, PC technician, James Wadsley, computer repair, Wadsley Tech Services" />
<meta name="description" content="PC Consulting by James Wadsley" />
<meta name="author" content="James M Wadsley" />
</head>
<body>
<div id="container">
<ul id="nav">
<li><a href="index.html">Home</a></li>
<li><a href="HomeServices.html">In Home Services</a></li>
<li><a href="BusinessServices.html">Business Services</a></li>
<li><a href="Contact.html">Contact</a></li>
<li><a href="Appointment.html">Appointments</a></li>
<li><a href="Pricing.html">Pricing</a></li>
</ul>
<center>
<img src="../business/Pictures/Logo-22.png" width="749px" height="113px" alt="Logo"/>
</center>
<center>
<br />
<img src="../business/Pictures/Appointments.png" width="749px" height="113px">
<br /><br />
<div id="content">
Please fill in all areas of the form for a faster response
<br /><br />
<div id="block">
<!-- STEP 1: Put the full URL to formmail.php on your website in the 'action' value. -->
<form method="post" action="http://www.wadsley.us/formmail.php" name="form">
<input type="hidden" name="env_report" value="REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER" />

<!-- STEP 2: Put your email address in the 'recipients' value.
Note that you also have to allow this email address in the
$TARGET_EMAIL setting within formmail.php!
-->
<input type="hidden" name="recipients" value="tech@wadsley.us" />

<!-- STEP 3: Specify required fields in the 'required' value - or leave unchanged.
NOTE: DO NOT put your email address and name here.
"Your email address" and "Your name" are error messages for your users to see,
not placeholders for you to replace.
-->

<!-- STEP 4: Put your subject line in the 'subject' value. -->
<input type="hidden" name="subject" value="Contact Reply Form" />

<!-- ALL DONE! Visit our site for HOW TO guides and more complex features. -->

<!-- this derives (creates) "email" and "realname" special fields from the input fields -->
<input type="hidden" name="derive_fields" value="email=EmailAddr,realname=FullName" />

<!-- this excludes the "email" and "realname" special fields from the body of the email you receive -->
<input type="hidden" name="mail_options" value="Exclude=email;realname" />
First Name: <Input type="text" name="realname" />&nbsp;&nbsp;&nbsp;&nbsp;Last Name: <Input type="text" name="lastname" /><br /><br />
Contact # / Email: <Input type="text" name="number" />&nbsp;&nbsp;&nbsp;&nbsp;Best Time to Contact: <Input type="text" name="time" /><br><br>
Type of Problem:&nbsp;&nbsp;<Input type="checkbox" name="problem" value="Computer" />Computer&nbsp;<Input type="checkbox" name="problem" value="Perephial" />Mouse, Keyboard, External Hard Drive, Etc<br /><Input type="checkbox" name="problem" value="Internet" />Internet Connection&nbsp;<Input type="checkbox" name="problem" value="Printer" />Printer&nbsp;<Input type="checkbox" name="problem" value="Other" />Other<br><br>
Priority:&nbsp;&nbsp;<Input type="radio" name="priority" value="High" />High&nbsp;<Input type="radio" name="priority" value="Medium" />Medium&nbsp;<Input type="radio" name="priority" value="Low" />Low<br><br>
<p>
Description of Problem:
</p>
<textarea rows="10" cols="30"></textarea>
<br>
<br>
<input type="submit" value="submit">
<input type="reset" value="reset">
</form>
</div>
<br />
<br />
</div>
</div>
<center>
<div id="footer">
techwork.wadsley.us is the property of James Wadsley. All rights reserved.
</div>
</center></body>
</html>

PHP File

$lNow = time();

ini_set('track_errors',1); // enable $php_errormsg

$aAlertInfo = array();
$aPHPVERSION = array();

$sLangID = ""; // the language ID
$aMessages = array(); // all FormMail messages in the appropriate
// language

$bUseOldVars = IsOldVersion($aPHPVERSION);

if (!IsPHPAtLeast("5.3.0"))
//
// disable this silly setting (usually not enabled)
// it's also deprecated from PHP version 5.3.0
//
set_magic_quotes_runtime(0);

//
// seed the random number generate if not version 4.2.0 or later
//
if (!IsPHPAtLeast("4.2.0"))
mt_srand(time());

//
// we set references to the appropriate arrays to handle PHP version differences
// Session vars are selected after we start the session.
//
if ($bUseOldVars)
{
$aServerVars = &$HTTP_SERVER_VARS;
$aGetVars = &$HTTP_GET_VARS;
$aFormVars = &$HTTP_POST_VARS;
$aFileVars = &$HTTP_POST_FILES;
$aEnvVars = &$HTTP_ENV_VARS;
}
else
{
$aServerVars = &$_SERVER;
$aGetVars = &$_GET;
$aFormVars = &$_POST;
$aFileVars = &$_FILES;
$aEnvVars = &$_ENV;
}
$bIsGetMethod = false;

//
// If the form submission was using the GET method, switch to the
// GET vars instead of the POST vars
//
if (isset($aServerVars["REQUEST_METHOD"]) && $aServerVars["REQUEST_METHOD"] === "GET")
{
$bIsGetMethod = true;
if ($bUseOldVars)
$aFormVars = &$HTTP_GET_VARS;
else
$aFormVars = &$_GET;
}

if (!isset($REAL_DOCUMENT_ROOT))
SetRealDocumentRoot();

if (isset($aServerVars['SERVER_PORT']))
$SCHEME = ($aServerVars['SERVER_PORT'] == 80) ? "http://" : "https://";
else
$SCHEME = "";
if (isset($aServerVars['SERVER_NAME']) && $aServerVars['SERVER_NAME'] !== "")
$SERVER = $aServerVars['SERVER_NAME'];
elseif (isset($aServerVars['SERVER_ADDR']) && $aServerVars['SERVER_ADDR'] !== "")
$SERVER = $aServerVars['SERVER_ADDR'];
else
$SERVER = "";

/*****************************************************************************/
/* CONFIGURATION (do not alter this line in any way!!!) */
/*****************************************************************************
* This is the *only* place where you need to modify things to use formmail.php
* on your particular system. This section finishes at "END OF CONFIGURATION".
* Help for all settings can be found on our website:
* http://www.tectite.com/fmdoc/index.php
*
* Also, above each setting is a direct URL to the help information for the
* setting.
*****************************************************************************/

/* Help: http://www.tectite.com/fmdoc/email_name.php */
define("EMAIL_NAME","^[-a-z0-9.]+"); // the '^' is an important security feature!

/* Help: http://www.tectite.com/fmdoc/target_email.php */
$TARGET_EMAIL = array(EMAIL_NAME."@wadsley\.us$");

/* Help: http://www.tectite.com/fmdoc/def_alert.php */
define("DEF_ALERT","jim@wadsley.us");

/* Help: http://www.tectite.com/fmdoc/site_domain.php */
$SITE_DOMAIN = ""; // your website domain name

/* Help: http://www.tectite.com/fmdoc/set_real_document_root.php */
$SET_REAL_DOCUMENT_ROOT = ""; // overrides the value set by SetRealDocumentRoot function

//
// override $REAL_DOCUMENT_ROOT from the $SET_REAL_DOCUMENT_ROOT value (if any)
// Do not alter the following code (next 3 lines)!
//
if (isset($SET_REAL_DOCUMENT_ROOT) && $SET_REAL_DOCUMENT_ROOT !== "")
$REAL_DOCUMENT_ROOT = $SET_REAL_DOCUMENT_ROOT;

/* Help: http://www.tectite.com/fmdoc/config_check.php */
$CONFIG_CHECK = array("TARGET_EMAIL");

/* Help: http://www.tectite.com/fmdoc/at_mangle.php */
define("AT_MANGLE","");

/* Help: http://www.tectite.com/fmdoc/target_urls.php */
$TARGET_URLS = array(); // default; no URLs allowed

/* Help: http://www.tectite.com/fmdoc/head_crlf.php */
define("HEAD_CRLF","\r\n");

/* Help: http://www.tectite.com/fmdoc/body_lf.php */
define("BODY_LF","\r\n"); // the new default: use this for CR+LF
//define("BODY_LF","\n"); // the old default: just LF

/* Help: http://www.tectite.com/fmdoc/from_user.php */
$FROM_USER = ""; // the default - setting not used

/* Help: http://www.tectite.com/fmdoc/sendmail_f_option.php */
define("SENDMAIL_F_OPTION",false);
define("SENDMAIL_F_OPTION_LINE",__LINE__-1); // don't modify this line!

/* Help: http://www.tectite.com/fmdoc/fixed_sender.php */
$FIXED_SENDER = "";

/* Help: http://www.tectite.com/fmdoc/set_sender_from_email.php */
define("SET_SENDER_FROM_EMAIL",false);

/* Help: http://www.tectite.com/fmdoc/ini_set_from.php */
define("INI_SET_FROM",false);
 
Back
Top