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.

You want to turn a QueryString argument into a PHP variable?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.