PDA

View Full Version : Help with website code



ross@rds
24-02-2007, 11:07 PM
Hi everyone need help here this is a code for people to contact you from you site but i dont know where to put my e-mail address so it will be sent to my e-mail account any one help ?


<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 ?>" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />
Attention:<br />
<select name="attn" size="1">
<option value=" Boss Man Ross ">Boss Man Ross </option>
<option value=" Dj On Air ">Dj On Air </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Sales ">Sales </option>
</select>
<br /><br />
Message:
<br />
<TEXTAAREA name="notes" rows="4" cols="40"></TEXTAAREA>
<br />
<input type="submit" value="Send"> <form method="post" action="[email protected]">
<br /></form>

Jiggles
24-02-2007, 11:14 PM
put this in to a file and call it booking.php or what ever you want



<?
$SendFrom = "Form Feedback <Some Person>"; $SendTo = "[email protected]"; $SubjectLine = "Quote Submission"; $ThanksURL = "thankyou.html";
$Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
$MsgBody = @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n$Divider\n"; foreach ($_POST as $Field=>$Value) $MsgBody .= "$Field: $Value\n"; $MsgBody .= "$Divider\n" . $_SERVER["HTTP_USER_AGENT"] . "\n"; $MsgBody = htmlspecialchars($MsgBody);
mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom"); header("Location: $ThanksURL");
?>





teh nput it like this in to your code:



<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 ?>" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />
Attention:<br />
<select name="attn" size="1">
<option value=" Boss Man Ross ">Boss Man Ross </option>
<option value=" Dj On Air ">Dj On Air </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Sales ">Sales </option>
</select>
<br /><br />
Message:
<br />
<TEXTAAREA name="notes" rows="4" cols="40"></TEXTAAREA>
<br />
booking.php">
<br /></form>




See my quote page for more details http://cbentertainments.bustedjump.com/quote.html

DMX Will
24-02-2007, 11:22 PM
Callum, you forgot some of the details, so your second bit of code wont work:



<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 ?>" />


Your Name: <br />
<input type="text" name="visitor" size="35" />
<br />
Your Email:<br />
<input type="text" name="visitormail" size="35" />
<br /> <br />
<br />
Attention:<br />
<select name="attn" size="1">
<option value=" Boss Man Ross ">Boss Man Ross </option>
<option value=" Dj On Air ">Dj On Air </option>
<option value=" General Support ">General Support </option>
<option value=" Technical Support ">Technical Support </option>
<option value=" Sales ">Sales </option>
</select>
<br /><br />
Message:
<br />
<TEXTAAREA name="notes" rows="4" cols="40"></TEXTAAREA>
<br />
<input type="submit" value="Send"> <form method="post" action="booking.php">
<br /></form>

The above would be the correct code from Callum's second section.

Jiggles
24-02-2007, 11:23 PM
woops :o must of accidentally deleted that bit :D