Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > creating html page

Reply
Thread Tools

creating html page

 
 
wes
Guest
Posts: n/a
 
      04-07-2006
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.

Thanks Wes

 
Reply With Quote
 
 
 
 
Neredbojias
Guest
Posts: n/a
 
      04-07-2006
To further the education of mankind, "wes" <(E-Mail Removed)> 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.

--
Neredbojias
Infinity can have limits.
 
Reply With Quote
 
 
 
 
wes
Guest
Posts: n/a
 
      04-07-2006
the actual filename

 
Reply With Quote
 
Arjen
Guest
Posts: n/a
 
      04-07-2006
wes wrote:
> 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.
>
> Thanks Wes
>


All sots of ways to do this but all involve server side scripting. Why
dont u try alt.php ?

Btw I'd immediately name myself ../index.php just to see if it would
work

arjen
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-07-2006
Neredbojias wrote:
> "wes" <(E-Mail Removed)> 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

 
Reply With Quote
 
Neredbojias
Guest
Posts: n/a
 
      04-07-2006
To further the education of mankind, Toby Inkster
<(E-Mail Removed)> 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.
 
Reply With Quote
 
Toby Inkster
Guest
Posts: n/a
 
      04-08-2006
Neredbojias wrote:

> 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?


Run it and see.

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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Load HTML page into another HTML page using Javascript Duke Javascript 1 04-18-2008 12:16 PM
Need help creating a "Click absolutely ANYWHERE on this page" link for an HTML page with no content STILL LEARNING HTML 31 02-10-2007 09:53 PM
How to display a html page after the original html page runs a perl script Stu HTML 2 04-06-2004 05:19 AM
how to redirect to a frames-based html page and load the right html when coming from an ASP.NET page Mark Kamoski ASP .Net 1 08-13-2003 05:51 AM



Advertisments