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.
 
Associate
Joined
28 May 2004
Posts
531
Location
The US of A
PHP, what a silly language. I put it "up" there with cold fusion. Not harping on you mate just the language. I prefer java or csharp.

Inquistor: That is a killer banner in your sig. Very nice.
 
Back
Top Bottom