Re: templates
| From: | Jonathan Sharp | Date: | Tue, 19 Nov 2002 16:33:43 +0000 |
| Subject: | Re: templates | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-125113@lists.php.net to get a copy of this message | ||
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.
>