Re: creating html page



To further the education of mankind, Toby Inkster
<usenet200604@xxxxxxxxxxxxxxxxx> 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.
.



Relevant Pages

  • Re: problem with include.
    ... include-Statement in it. ... Minimum Requirement: PHP 4.3.3 ... This error log is empty. ...
    (comp.lang.php)
  • IE Page Freezes
    ... and PHP. ... refresh occurs the page stops rendering at the point where my script ... // *** Logout the current user removing cookies and count. ...
    (comp.lang.php)
  • Vuln in PHPGEDVIEW 2.61 Multi-Problem
    ... Lang: PHP ... Rick: Hight ... Windak - Vietnamese Security Group ...
    (Bugtraq)
  • Re: PHP to EMail BCC
    ... First off let me say I know near nothing about PHP. ... Some time ago I purchased a little program called PHP Form Wizard to ... form input data to a specified addy which works well. ...
    (alt.php)
  • Re: PHP.exe closing on exit
    ... > doesn't seem to have the traditional options of an MS-DOS program. ... your script exits, the PHP shell that launched it has no purpose, so it ... I'd expect a language interpreter to exit once I'm done with it ...
    (comp.lang.php)