Reply to Re: creating html page

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация