Jump to content

Passing javascript values to php


bubba1356

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.