[PHP] Defining PHP varibles from URL Solved!

2002-05-06 Thread webmaster
Sorry I did read all your replies etc. They were helpful.   I have now solved the 'problem' and thank you all.   I have less than week of experiance in PHP and am still learning.   JJ Harrison[EMAIL PROTECTED]www.tececo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

RE: [PHP] Defining PHP varibles from URL

2002-05-06 Thread Insomniac Admin
A simple example might be (unoptimised for clarity): http://www.myserver.com/someurl/page.php?file=home v4.1.x $file = $_GET("file"); // Remove case sensitivity $file = strtolower($file); // To stop people including just ANY old file, we are going to use a switch // to validate the

RE: [PHP] Defining PHP varibles from URL

2002-05-06 Thread David Freeman
-Original Message- I don't mean to be a pain but could someone send me a working example? -Original Message- This was replied to already by me and others. Didn't you read the replies? In any event, here's what I wrote last time... -Original Message- $file = ""; //the

Re: [PHP] Defining PHP varibles from URL

2002-05-06 Thread Jason Wong
On Monday 06 May 2002 17:28, [EMAIL PROTECTED] wrote: > 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 Didn't you read the numerous replies to your first posting? --

Re: [PHP] Defining PHP varibles from URL

2002-05-06 Thread 1LT John W. Holmes
ent: Monday, May 06, 2002 5:28 AM Subject: [PHP] Defining PHP varibles from URL 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

Re: [PHP] Defining PHP varibles from URL

2002-05-06 Thread Pedro Pontes
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 ex

[PHP] Defining PHP varibles from URL

2002-05-06 Thread webmaster
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

Re: [PHP] Defining PHP varibles from URL

2002-05-05 Thread Miguel Cruz
On Sun, 5 May 2002, Teemu Pentinsaari wrote: >>> It could be what I was typing in the url bar. >>> >>> file.php?file=foobar.inc >> >> 1) Try include $_GET['file']; >> >> 2) Let me know where your server is so I can go to >> >>http://your.server/file.php?file=/etc/passwd > > You might want to

RE: [PHP] Defining PHP varibles from URL

2002-05-05 Thread John Holmes
> > file.php?file=inc.foobar.php > - > include("include/$file"); > That doesn't fix anything... file.php?file=../../../etc/passwd Just a matter of a few tries to see how many directories you have to go up... ---John Holmes... -- PHP General Mailing List (http:

Re: [PHP] Defining PHP varibles from URL

2002-05-05 Thread Teemu Pentinsaari
> > It could be what I was typing in the url bar. > > > > file.php?file=foobar.inc > > 1) Try include $_GET['file']; > > 2) Let me know where your server is so I can go to > >http://your.server/file.php?file=/etc/passwd > > miguel You might want to use .php file extension and /include/ direct

RE: [PHP] Defining PHP varibles from URL

2002-05-05 Thread David Freeman
-Original Message- $file = ""; //the above is defined from the url include "$file"; It could be what I was typing in the url bar. file.php?file=foobar.inc -Original Message- Hmm, so you define $file in your url as "foobar.inc" and then, in the page itself you take change $file

Re: [PHP] Defining PHP varibles from URL

2002-05-04 Thread Miguel Cruz
On Sun, 5 May 2002 [EMAIL PROTECTED] wrote: > I 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. > > > $file = ""; > //the above is defined from the url > include "$file"; > > > It could be what I was typing in the

[PHP] Defining PHP varibles from URL

2002-05-04 Thread webmaster
I 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. ="php">

$file = "";
//the above is defined from the url

inc