Good morning all,
I am trying to add a redirect script to the end of the PHP form I created, but can’t seem to find one that will work with the PHP. Anyone have any ideas?
[URL=”http://www.jacksoncabinboys.com/jcb/fanclub.php”]Here’s a link to the file
Here’s the PHP:
[code=php]<?php
} else {
error_reporting(0);
$recipient = ‘[email protected]’;
$subject = ‘New Fan Club Member!’;
$name = “Name:n”.stripslashes($_POST[‘name’]);
$email = “Email:n”.stripslashes($_POST[’email’]);
$cell = “Phone:n”.stripslashes($_POST[‘cell’]);
$aim = “AIM:n”.stripslashes($_POST[‘aim’]);
$add = “City:n”.stripslashes($_POST[‘aim’]);
$add2 = “State:n”.stripslashes($_POST[‘state’]);
$msg = “$namenn”.”$emailn”.”$celln”.”$aimnn”.”$addn”.”$add2n”;
if(mail(“$recipient”,”$subject”,”$msg”))
echo nl2br(“<p align=’center’>
<b>Message Sucessfully Sent!</b>
<i>Click the banner above to return to our site!</i>
</p>
”
);
else
echo “Message failed to send”;
}
?>
Here’s the HTML:
[code=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”>
<head>
<meta name=”keywords” content=”jackson cabin boys, south point, ashland, huntington, country, music, matt mcclay, lance ross, jackson lake, wtcr, ohio, kentucky, west virginia, folsom prison blues, mp3, download, matt, lance, official, official site, anything but mine” />
<meta name=”description” content=”The official website of the country music duo, the Jackson Cabin Boys!” />
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>::The Official Website of the Jackson Cabin Boys::</title>
<style type=”text/css”>
<!–
body {
background-color: #333333;
}
.style2 {font-size: x-small}
.style3 {color: #CCCCCC; font-family: Arial, Helvetica, sans-serif;}
.style5 {
color: #FFFFFF;
font-family: Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
}
.style7 {
font-family: Arial, Helvetica, sans-serif;
font-size: small;
color: #FFFFFF;
}
a:link {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
font-style: normal;
font-weight: bold;
color: #CCCCCC;
text-decoration: none;
}
a:visited {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
font-style: normal;
font-weight: bold;
color: #CCCCCC;
text-decoration: none;
}
a:hover {
font-family: Arial, Helvetica, sans-serif;
font-size: medium;
font-style: normal;
font-weight: bold;
color: #FFFF66;
text-decoration: none;
}
–>
</style>
</head>
<body>
<?php
if ($_SERVER[‘REQUEST_METHOD’] != ‘POST’){
$me = $_SERVER[‘PHP_SELF’];
?>
<table width=”800″ border=”0″ align=”center”” cellpadding=”0″ cellspacing=”0″ bgcolor=”#000000 align=”center>
<tr>
<td bgcolor=”#666666″>
<span class=”style5″>JacksonCabinBoys.com</span></td>
</tr>
<tr>
<td bgcolor=”#999999″><div align=”center”><a href=”index.html”>Home</a> | <a href=”bio.html”>Bio</a> | <a href=”shows.html”>Shows</a> | <a href=”news.html”>News</a> | <a href=”fanclub.html”>Fan Club</a> | <a href=”media.html”>Media</a> | <a href=”contact.html”>Contact Info</a> | <a href=”http://www.myspace.com/jacksoncabinboys” target=”_new”>MySpace</a></div></td>
</tr>
<tr>
<td><img src=”images/banner_1gray.jpg” width=”800″ height=”300″ /></td>
</tr>
<tr>
<td valign=”top” bgcolor=”#000000″><table width=”795″ border=”0″ cellspacing=”0″ cellpadding=”0″>
<tr>
<td width=”794″ valign=”top”><pre class=”style7″> Welcome to the official website of the Jackson Cabin Boys! Whether you are a tried-and-true JCB fan, or are checking us out for the<br> first time, we hope enjoy our music. Our schedule changes often, so check our website often for the most up-to-date show times<br> and dates. Sit back, relax, and enjoy the Jackson Cabin Boys!
</pre>
<form name=”fanclubform” method=”post” action=”<?php echo $me;?>”>
<input type=”text” name=”name” id=”name” />
<span class=”style7″>Name</span>
<br />
<input type=”text” name=”email” id=”email” />
<span class=”style7″>E-Mail</span><br />
<input type=”text” name=”cell” id=”cell” size=”15″ />
<span class=”style7″>Phone</span><br />
<input type=”text” name=”aim” id=”aim” size=”20″ />
<span class=”style7″>AIM</span><br />
<input type=”text” name=”city” id=”city” />
<select name=”state” id=”state”>
<option>–</option>
<option>AL</option>
<option>AK</option>
<option>AZ</option>
<option>AR</option>
<option>CA</option>
<option>CO</option>
<option>CT</option>
<option>DE</option>
<option>DC</option>
<option>FL</option>
<option>GA</option>
<option>HI</option>
<option>ID</option>
<option>IL</option>
<option>IN</option>
<option>IA</option>
<option>KS</option>
<option>KY</option>
<option>LA</option>
<option>ME</option>
<option>MD</option>
<option>MA</option>
<option>MI</option>
<option>MN</option>
<option>MS</option>
<option>MO</option>
<option>MT</option>
<option>NV</option>
<option>NH</option>
<option>NJ</option>
<option>NM</option>
<option>NC</option>
<option>NY</option>
<option>ND</option>
<option>OH</option>
<option>OK</option>
<option>OR</option>
<option>PA</option>
<option>RI</option>
<option>SC</option>
<option>SD</option>
<option>TN</option>
<option>TX</option>
<option>UT</option>
<option>VT</option>
<option>WA</option>
<option>WV</option>
<option>WI</option>
<option>WY</option>
</select>
<span class=”style7″>City/State</span><br />
<input type=”submit” value=”Join the Club!” name=”submit” id=”submit” />
</form>
<?php
} else {
error_reporting(0);
$recipient = ‘[email protected]’;
$subject = ‘New Fan Club Member!’;
$name = “Name:n”.stripslashes($_POST[‘name’]);
$email = “Email:n”.stripslashes($_POST[’email’]);
$cell = “Phone:n”.stripslashes($_POST[‘cell’]);
$aim = “AIM:n”.stripslashes($_POST[‘aim’]);
$add = “City:n”.stripslashes($_POST[‘aim’]);
$add2 = “State:n”.stripslashes($_POST[‘state’]);
$msg = “$namenn”.”$emailn”.”$celln”.”$aimnn”.”$addn”.”$add2n”;
if(mail(“$recipient”,”$subject”,”$msg”))
echo nl2br(“<p align=’center’>
<b>Message Sucessfully Sent!</b>
<i>Click the banner above to return to our site!</i>
</p>
”
);
else
echo “Message failed to send”;
}
?>
</td>
</tr>
</table></td>
</tr>
</table>
<div align=”center” class=”style2″>
<pre><span class=”style3″>Copyright © 2008 Matt McClay;
All Rights Reserved</span></pre>
</div>
<div align=”left”></div>
</body>
</html>