bubba1356 Posted April 5, 2008 Share Posted April 5, 2008 Hey guys, I'm trying to pass the referrer to a php file from javascript and pick up the values using php. I think I'm on the right lines with the following code: <script type="text/javascript"> src="addview.php?Sitenum=19&Referrer=" + document.referrer; </script> I dont want to navigate to the 'addview.php' page- I want the browser to remain on the current page but send the referrer to this page. Can anyone advise me on how this is done? Thanks, Bubba Link to comment https://forums.phpfreaks.com/topic/99728-passing-javascript-values-to-php/ Share on other sites More sharing options...
gluck Posted April 9, 2008 Share Posted April 9, 2008 Not sure what you mean by this but Ajax might be your solution. Link to comment https://forums.phpfreaks.com/topic/99728-passing-javascript-values-to-php/#findComment-513441 Share on other sites More sharing options...
haku Posted April 10, 2008 Share Posted April 10, 2008 What do you mean "send the referrer to this page"? What is it that you are trying to do? But even without the answers to those questions, I can say that you aren't on the track with your code. Its not easy to pass variables from Javascript to php. Link to comment https://forums.phpfreaks.com/topic/99728-passing-javascript-values-to-php/#findComment-513741 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.