RSS Forums RSS
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Passing a Javascript variable to a PHP using <script> call

Join Date: Nov 2004
Location: Milwaukee, WI
Posts: 62
Reputation: 2ndPlatform is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 0
2ndPlatform's Avatar
2ndPlatform 2ndPlatform is offline Offline
Junior Poster in Training

Passing a Javascript variable to a PHP using <script> call

  #1  
Sep 3rd, 2005
Alright - I'm stumped. I need to get a variable from file1.html to file2.php which is called like this from file1.html:

<script src="scripts/file2.php" type="text/javascript"></script>

In file1.html I have the variable definition to grab the referring URL -

<script>
if (document.referrer) {
	var referringURL = document.referrer;
} else {
	var referringURL = "No referrer."
}
</script>

But I need to get 'referringURL' into that PHP file.

Any suggestions?

Thanks.
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:40 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC