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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.