Cheers for replying.

I have the menu in place already, it is the PHP end i'm not sure about.
Currently I have many php files which only differ in one line:
$filename="file.xml";

I want to be able to pass this value to the script through a link.

A.

----- Original Message -----
From: "Jonathan Sharp" <[EMAIL PROTECTED]>
To: "Adam" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, November 19, 2002 4:33 PM
Subject: Re: [PHP] templates


> I'm assuming you're trying to have a select list.
>
> Try this:
>
> <select name="foo"
> onChange="window.location='<?=$PHP_SELF?>?action=load&file=' +
this.value">
> <option value="file.xml">File XML1</option>
> <option value="file2.xml">File foo</option>
> </select>
>
> Just make sure you test the value you get for file, so that someone
> doesn't pass you /etc/passwd (just an example).
>
> -js
>
>
> Adam wrote:
> > I am developing a site, using XML and PHP for formatting. I want to have
one HTML template and call up the different XML files from a Javascript
menu.
> > Ideally i want to be able to call files from a link, such as:
> >     'index.php?action=load&file="file.xml"'
> >
> > Not sure if this is the right format, but hopefully you get the idea.
> >
> > Cheers,
> > Adam.
> >
>
>
>


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

Reply via email to