Hi,
I created a form that sends a link to the email address entered in a form field.
it pulls the wep page address from the page where the form is inbeded.
I want to change it so that I can have a link on my page which will display a popup with a form do the above, my problem is capturing the web page url .
any throughts
current code
[code]
<body>
<?
$url = “http://www.tomorrownextweek.com”.$_SERVER[‘REQUEST_URI’];
?>
<h5 style=”text-align: center;”>Send Page Link to a Friend</h5>
<div id =”referralForm”>
<form name=”referral” id =”referral” method=”post” action=”http://www.tomorrownextweek.com/rf/sf.php”>
<fieldset>
<legend></legend>
<input type=”hidden” name=”url” value=”<?php echo $url;?>”>
<label for=”fromEmail”>
Your Email Address:
<input id=”fromEmail” name=”fromEmail” type=”text”>
</label>
<label for=”toEmail”>
There Email Address:
<input id=”toEmail” name=”toEmail” type=”text”>
</label>
<label>
<input type=”submit” value=”Send” onclick=”compute(this.form)”>
</label>
</fieldset>
</form>
</div>
</body>
</html>
creating the email
[code=php]
<body>
<div id=”outer”>
<div id=”sub”>
<div id=”center”>
<?
// Let’s mail the user!
$toEmail = $_POST[‘toEmail’];
$fromEmail = $_POST[‘fromEmail’];
$url = $_POST[‘url’];
$subject = “Site Referred from $fromEmail”;
$message = “Have a look at this page!
A Friend thought that this website might be of interest
please click here: $url
Thank You for Visiting Tomorrow Next Week.
This is an automated response, please do not reply!”;
mail($toEmail, $subject, $message,
“From: TomorrowNextWeek.com<[email protected]>n
X-Mailer: PHP/” . phpversion());
echo ‘Thank you for Referring my Webpage <br />’;
echo “<a href=’$url’>$url</a>”;
?>
</div>
</div>
<div id=”footer”>
<p>Copyright © TomorrowNextweek.com</p>
</div>
</div>
</body>
</html>