Harlem Of Nem
08-20-2007, 12:15 PM
I have been trying for a few weeks now to get this code to work but I have now just given up...
Please can someone help me to get the following code to work?
The form...
<!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://harlem9191.joolo.com/Clan%20News.css" type="text/css" rel="stylesheet" />
<form action="http://nemesisclan.myfreewebs.net/sendeail.php" method="post">
<!-- DO NOT change ANY of the php sections --><!--p
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
--><input type="hidden" name="ip" value="<?php echo $ipi ?>" /> <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" /> <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" /><font face="calligraph421 BT" color="#ffffff" size="2"><label style="FLOAT: left; WIDTH: 140px" for="name">Runescape Username:<input class="codebuttons" id="name" style="WIDTH: 200px" maxlength="12" name="name" /> <label style="FLOAT: left; WIDTH: 140px" for="cb">Combat Level:</label><input class="codebuttons" id="cb" style="FLOAT: left; WIDTH: 25px" maxlength="3" name="cb" /> <label style="FLOAT: left; WIDTH: 140px" for="al">Attack Level:</label><input class="codebuttons" id="al" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="al" /> <label style="FLOAT: left; WIDTH: 140px" for="sl">Strength Level:</label><input class="codebuttons" id="sl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="sl" /> <label style="FLOAT: left; WIDTH: 140px" for="dl">Defence Level:</label><input class="codebuttons" id="dl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="dl" /> <label style="FLOAT: left; WIDTH: 140px" for="rl">Range Level:</label><input class="codebuttons" id="rl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="rl" /> <label style="FLOAT: left; WIDTH: 140px" for=ml">Mage Level:</label><input class="codebuttons" id="ml" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="ml" />
<div style="CLEAR: left; HEIGHT: 20px"></div>
<label style="DISPLAY: block; MARGIN-BOTTOM: 5px" for="why">Why do you think you should join Nemesis?</label><input class="codebuttons" id="why" style="WIDTH: 300px; HEIGHT: 100px" maxlength="1000" name="why" /> <label style="DISPLAY: block; MARGIN-BOTTOM: 5px" for="other">Other:</label><input class="codebuttons" id="other" style="WIDTH: 300px; HEIGHT: 100px" maxlength="1000" name="other" /> <label style="FLOAT: left; WIDTH: 140px">Member or Clan Friend?:</label><span style="DISPLAY: block; WIDTH: 400px" name="mocf"><input id="J1radioOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="radio" name="Member" value="1" /><label for="J1radioOption">Member:</label><input id="J2radioOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="radio" name="Clanfriend" value="2" /><label for="J2radioOption">Clan Friend:</label></span> <label style="FLOAT: left; WIDTH: 140px">Finish:</label><span style="DISPLAY: block; WIDTH: 400px" name="finish"><input id="K1checkboxOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="checkbox" name="finish" value="1" /><label for="K1checkboxOption">Are you happy with your application?</label></span></label></font>
<div style="CLEAR: left; HEIGHT: 20px"></div>
<br />
<center><input class="codebuttons" type="submit" value="Submit Registration" /></center>
</form>
Code to send email...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$name = $_POST['name'];
$cb = $_POST['cb'];
$al = $_POST['al'];
$dl = $_POST['dl'];
$sl = $_POST['sl'];
$rl = $_POST['rl'];
$ml = $_POST['ml'];
$other = $_POST['other'];
$why = $_POST['why'];
$mocf = $_POST['mocf'];
$finish = $_POST['finish'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = "Nemesis Applicant...";
$notes = stripcslashes($notes);
$message = "Submitted on: $todayis [EST] \n
From: $name \n\n
Combat level: $cb \n
Attack Level: $al \n
Defence Level: $dl \n
Strength Level: $sl \n
Range Level: $rl \n
Mage Level: $ml \n
Why should you join nemesis?: $why \n
Other: $other \n
Member or Clan Friend: $mocf \n\n
Additional Info: IP = $ip \n
Browser Info: $httpagent \n
";
$from = "From: $name\r\n";
mail("harlem111@hotmail.co.uk", $subject, $message, $from);
?>
<p align="center">
Thank You : <?php echo $name ?>
<br />
This form was submitted on: <?php echo $todayis ?>
<br />
Your IP address is:<?php echo $ip ?>
<br /><br />
<a href="http://s10.invisionfree.com/nemesisrsclan/index.php?act=Reg&CODE=00">Next Step</a>
</p>
</body>
</html>
Please can someone help me to get the following code to work?
The form...
<!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="http://harlem9191.joolo.com/Clan%20News.css" type="text/css" rel="stylesheet" />
<form action="http://nemesisclan.myfreewebs.net/sendeail.php" method="post">
<!-- DO NOT change ANY of the php sections --><!--p
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
--><input type="hidden" name="ip" value="<?php echo $ipi ?>" /> <input type="hidden" name="httpref" value="<?php echo $httprefi ?>" /> <input type="hidden" name="httpagent" value="<?php echo $httpagenti ?>" /><font face="calligraph421 BT" color="#ffffff" size="2"><label style="FLOAT: left; WIDTH: 140px" for="name">Runescape Username:<input class="codebuttons" id="name" style="WIDTH: 200px" maxlength="12" name="name" /> <label style="FLOAT: left; WIDTH: 140px" for="cb">Combat Level:</label><input class="codebuttons" id="cb" style="FLOAT: left; WIDTH: 25px" maxlength="3" name="cb" /> <label style="FLOAT: left; WIDTH: 140px" for="al">Attack Level:</label><input class="codebuttons" id="al" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="al" /> <label style="FLOAT: left; WIDTH: 140px" for="sl">Strength Level:</label><input class="codebuttons" id="sl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="sl" /> <label style="FLOAT: left; WIDTH: 140px" for="dl">Defence Level:</label><input class="codebuttons" id="dl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="dl" /> <label style="FLOAT: left; WIDTH: 140px" for="rl">Range Level:</label><input class="codebuttons" id="rl" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="rl" /> <label style="FLOAT: left; WIDTH: 140px" for=ml">Mage Level:</label><input class="codebuttons" id="ml" style="FLOAT: left; WIDTH: 18px" maxlength="2" name="ml" />
<div style="CLEAR: left; HEIGHT: 20px"></div>
<label style="DISPLAY: block; MARGIN-BOTTOM: 5px" for="why">Why do you think you should join Nemesis?</label><input class="codebuttons" id="why" style="WIDTH: 300px; HEIGHT: 100px" maxlength="1000" name="why" /> <label style="DISPLAY: block; MARGIN-BOTTOM: 5px" for="other">Other:</label><input class="codebuttons" id="other" style="WIDTH: 300px; HEIGHT: 100px" maxlength="1000" name="other" /> <label style="FLOAT: left; WIDTH: 140px">Member or Clan Friend?:</label><span style="DISPLAY: block; WIDTH: 400px" name="mocf"><input id="J1radioOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="radio" name="Member" value="1" /><label for="J1radioOption">Member:</label><input id="J2radioOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="radio" name="Clanfriend" value="2" /><label for="J2radioOption">Clan Friend:</label></span> <label style="FLOAT: left; WIDTH: 140px">Finish:</label><span style="DISPLAY: block; WIDTH: 400px" name="finish"><input id="K1checkboxOption" style="BORDER-RIGHT: 0px; BORDER-TOP: 0px; VERTICAL-ALIGN: middle; BORDER-LEFT: 0px; BORDER-BOTTOM: 0px; BACKGROUND-COLOR: transparent" type="checkbox" name="finish" value="1" /><label for="K1checkboxOption">Are you happy with your application?</label></span></label></font>
<div style="CLEAR: left; HEIGHT: 20px"></div>
<br />
<center><input class="codebuttons" type="submit" value="Submit Registration" /></center>
</form>
Code to send email...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sendemail Script</title>
</head>
<body>
<!-- Reminder: Add the link for the 'next page' (at the bottom) -->
<!-- Reminder: Change 'YourEmail' to Your real email -->
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$name = $_POST['name'];
$cb = $_POST['cb'];
$al = $_POST['al'];
$dl = $_POST['dl'];
$sl = $_POST['sl'];
$rl = $_POST['rl'];
$ml = $_POST['ml'];
$other = $_POST['other'];
$why = $_POST['why'];
$mocf = $_POST['mocf'];
$finish = $_POST['finish'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$subject = "Nemesis Applicant...";
$notes = stripcslashes($notes);
$message = "Submitted on: $todayis [EST] \n
From: $name \n\n
Combat level: $cb \n
Attack Level: $al \n
Defence Level: $dl \n
Strength Level: $sl \n
Range Level: $rl \n
Mage Level: $ml \n
Why should you join nemesis?: $why \n
Other: $other \n
Member or Clan Friend: $mocf \n\n
Additional Info: IP = $ip \n
Browser Info: $httpagent \n
";
$from = "From: $name\r\n";
mail("harlem111@hotmail.co.uk", $subject, $message, $from);
?>
<p align="center">
Thank You : <?php echo $name ?>
<br />
This form was submitted on: <?php echo $todayis ?>
<br />
Your IP address is:<?php echo $ip ?>
<br /><br />
<a href="http://s10.invisionfree.com/nemesisrsclan/index.php?act=Reg&CODE=00">Next Step</a>
</p>
</body>
</html>