|
Posted by Neredbojias on 12/13/00 11:44
To further the education of mankind, Toby Inkster
<usenet200604@tobyinkster.co.uk> declaimed:
>> Do you mean the file name of the document or title of the document?
>> If the latter, a little php makes it a cinch.
>
> The former ain't much harder:
>
> ====================================================
> <?php
> # call this file "foo.php".
>
> if (strlen($_SERVER['PATH_INFO']))
> {
> print "This is {$_SERVER['PATH_INFO']}";
> exit;
> }
> elseif (strlen($_GET['name']))
> {
> header("Location: foo.php/{$_GET['name']}");
> exit;
> }
> ?>
> <form action="foo.php" method="get">
> <input name="name">
> <input type="submit">
> </form>
> ====================================================
>
> and then visit foo.php.
Since this is Friday, I'm not sure I follow that. Okay, if the form is
submitted with a 'name', it redirects to foo.php/name. What is $_SERVER
['PATH_INFO'] for, and how does this create a user-named document?
--
Neredbojias
Infinity can have limits.
[Back to original message]
|