You are here: Re: creating html page « HTML « IT news, forums, messages
Re: creating html page

Posted by Toby Inkster on 11/23/46 11:44

Neredbojias wrote:
> "wes" <wesley@ispace.co.za> declaimed:
>
>> How do you dynamically create a web page. If i ask the user to enter a
>> name, then the html document must be created with the name that the
>> user entered as the name of the document.
>
> 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.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

 

Navigation:

[Reply to this 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

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