Hi People,
I have a very simple
PHP problem i need sorting!
I doing a 'send page to friend'
php script and want to include a link to a page in the recieved email but have the link hidden (with a different name/url hidden) to a page.
eg. in
php it would be:
Quote:
|
<a href="www.hello.com">hello </a>
|
here is the
php script for the send mail:
Quote:
<?php
if (isset($_POST['submit'])) {
$sendername = $_POST['sendername'];
$senderemail = $_POST['senderemail'];
$recipname = $_POST['recipname'];
$recipemail = $_POST['recipemail'];
$custmessage = $_POST['message'];
$staticmsg = "Hi $recipname \n Your friend $sendername ($senderemail) thinks you'd be interested in seeing the following page from s: $urltosend \n They have added the following message: \n $custmessage";
$ipaddress = $_SERVER['REMOTE_ADDR'];
$subject = "$sendername has a page they'd like you to see";
$headers = "From: ss \r\n";
$headers .= "Reply-To: $senderemail";
dfdf
if (mail($recipemail,$subject,$staticmsg,$headers)){
echo "<p>Success. Your message was sent.</p>";
} else {
echo "<p>Your message could not be sent at this time. Go back to the <a href=\"$urltosend\">page you were previously browsing</a>?</p>";
}
} else {
?>
<script language="JavaScript">
<!--
window.resizeTo(500,500)
-->
</script>
<style type="text/css">
<!--
body {
background-color: #CC071E
}
#contents {
color: #000000;
width: 400px;
background-color: #CC071E;
}
.form {
font-family: Helvetica, "Helvetica Neue", Verdana, Arial;
font-size: 11px;
font-style: normal;
font-weight: normal;
color: #FFFFFF;
text-decoration: none;
width: 400px;
margin-left: 20px;
}
.logo {
top: 0px;
left: 0px;
width: 200px;
height:150px;
}
-->
</style>
<div id = "contents">
<div class = "form">
<form action="sendtoafriend2.php" method="post">
<p><img src="images/ss_logo.gif" width="196" height="98" /><br />
<br />
<input type="text" name="sendername" id="sendername" /> Your Name<br />
<br />
<input type="text" name="senderemail" id="senderemail" /> Your Email<br />
<br />
<input type="text" name="recipname" id="recipname" /> Friend's Name<br />
<br />
<input type="text" name="recipemail" id="recipemail" /> Friend's Email<br />
<br />
<textarea name="message" rows="5" id="message"></textarea>
Custom Message<br />
<br />
<input type="submit" name="submit" id="submit" value="Send" />
<br />
</p>
</form>
</div>
</div>
<?php
}
?>
|