hi, I created a link where a user can click on and a new browser opens which allows the user to fill in the form and email a friend.
before code:
echo '<a href="http://localhost/test/test" target="_blank">Email friend</a>';
This was working perfectly but I then decided to use javascript to reduce the the size of the screen that apears without the addressbar. I used javascript however, this gets rendered perfectly in firefox it recognises the website the user wants to email a firend.
<script language="JavaScript">
function newwindow() {
window.open('http://localhost/test/test,'jav','width=380,height=500,resizable=yes');
}
</script>
echo "<a href='javascript:newwindow()'>Email friend</a>";
However, when using exporer it gives me the following error: Undefined index: HTTP_REFERER in filename.php and i can't see where i'm going wrong. Here's the php code that doesn't recngnise the url address.
<?php $recommend_URL = $_SERVER['HTTP_REFERER']; ?>
part of the form for emailing a freind:
<h2>Email this page to a friend</h2>
<form name="form" method="post" action="email_form.php" onSubmit="return validate()">
<p><?php echo "<a href=\"".$recommend_URL."\" target=\"_blank\">".$recommend_URL."</a>"; ?> </p>
thnaks