verN Posted April 9, 2007 Share Posted April 9, 2007 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 Link to comment https://forums.phpfreaks.com/topic/46243-email-friend-form-problem/ Share on other sites More sharing options...
clown[NOR] Posted April 9, 2007 Share Posted April 9, 2007 is there any special line number specified in that error message? if so... show us the specified line and 3-4 lines above and below Link to comment https://forums.phpfreaks.com/topic/46243-email-friend-form-problem/#findComment-224853 Share on other sites More sharing options...
verN Posted April 9, 2007 Author Share Posted April 9, 2007 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. Problem lies in the following. Code: <?php $recommend_URL = $_SERVER['HTTP_REFERER']; ?> Link to comment https://forums.phpfreaks.com/topic/46243-email-friend-form-problem/#findComment-224854 Share on other sites More sharing options...
verN Posted April 9, 2007 Author Share Posted April 9, 2007 can anyone help me this still doesn't work Link to comment https://forums.phpfreaks.com/topic/46243-email-friend-form-problem/#findComment-225091 Share on other sites More sharing options...
verN Posted April 10, 2007 Author Share Posted April 10, 2007 anyone please help! this is bugging me now work in mozilla but in explorer gives me the error meantioned above Link to comment https://forums.phpfreaks.com/topic/46243-email-friend-form-problem/#findComment-225828 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.