The way you're doing it now, you're first ERASING whatever value passed from
the URL, with

$file="";

and then trying to use it...

If this ' $file="" '  is some declaration attempt, just drop it, you don't
need to declare variables in PHP. Just check if $file has a value and then
use it.

For example,

if ($file != "")
    include($file);

Hope it helps.


--


Pedro Alberto Pontes
<[EMAIL PROTECTED]> wrote in message
009501c1f4e0$636d3e80$0100a8c0@JohnH">news:009501c1f4e0$636d3e80$0100a8c0@JohnH...
I don't mean to be a pain but could someone send me a working example?

I am what you would probably call a 'newbie'

For those who don't know here is my previous message

 can't seem to define a varible from the url entered into a browser.

I wish to use the following code or something like it.
<script language="php">
$file = "";
//the above is defined from the url
include "$file";
</script>
It could be what I was typing in the url bar.
file.php?file=foobar.inc

Thanks,
JJ Harrison
[EMAIL PROTECTED]
www.tececo.com



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to