Simple PHP Problem. URL Reading.

Soldato
Joined
10 Dec 2003
Posts
6,348
I'm trying to get PHP to read the current URL to check for a word, in order to carry out a task.

Here is what I have so far, but it doesn't work.

Code:
<?php

	if ($_GET['form']) {
		
		include "includes/javascript.php";
		
		}

?>

I want PHP to look in the url for the word "form" and, if it exists, include that file. Otherwise, don't.

I'm doing this so that the JavaScript is loaded only when it's needed and not on every page.

Any help?

Thanks,

Phil.
 
Back
Top Bottom