Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Programming > Databases - MySQL, SQL, Oracle, Access and others
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 10-19-2006, 10:08 AM   #1 (permalink)
drew22299
Junior Member
 
Join Date: Mar 2006
Location: Wilts / Bristol
Posts: 55
Default Can you use PHP to create a new html page?

I want to create a login page for users, once they have created a screen name and entered their details, is it possible to transfer the details they entered to a profile page which is automatically created with the screen name they entered as the url after the website name?

for example

www.sitename.com/screenname
__________________
www.hotlista.co.uk
drew22299 is offline   Reply With Quote
Sponsored Links
Old 10-19-2006, 06:13 PM   #2 (permalink)
Chikenty
Junior Member
 
Join Date: Sep 2006
Posts: 4
Default Re: Can you use PHP to create a new html page?

are u talkin about a directory or a .php file...if its a php file if i am correct yea it would be /screename but it would be /screename.php?id=32235 .... i think thats right but wait til u get some pro. help
Chikenty is offline   Reply With Quote
Old 10-20-2006, 05:13 AM   #3 (permalink)
drew22299
Junior Member
 
Join Date: Mar 2006
Location: Wilts / Bristol
Posts: 55
Default Re: Can you use PHP to create a new html page?

Thanks, your answer is still useful,

would it need to be a directory if it was to store a photo of the user and other information in the profile?

how would i be able to implement it such that when a user registers it will create a blank php profile page?
__________________
www.hotlista.co.uk
drew22299 is offline   Reply With Quote
Old 11-13-2006, 12:56 PM   #4 (permalink)
karlkatzke
Junior Member
 
Join Date: Nov 2006
Location: College Station, TX
Posts: 6
Default Re: Can you use PHP to create a new html page?

OK, step 1: Let's clarify what PHP does.

PHP is a programming language that specializes in producing web pages... but you can produce anything, from VCards (to use a previous example from today) to .XLS files to PDF files to HTML files. In simple terms, this means that you can pass the program variables, and it executes program logic to output a display format.

PHP doesn't create an HTML file (although it -can- save a file), it simply displays HTML to the user. You don't have to have PHP save an HTML file for the file to be visible to an end-user, it only has to output HTML.

In your case, you want a user to enter data into some displayed HTML in their browser, then you want that form to submit to a particular page and do something like create a new row in a database, and then you want to redirect the user to another page that displays and allows them to change their profile information. Nowhere in there do we actually need to create an HTML file, we just need to *display* html.

Step 2: The short URLS

Google 'mod_rewrite' -- there's an apache module that will allow you to rewrite

sitename.com/foobar
into
sitename.com/user_profile.php?id=foobar

So the user enters sitename.com/foobar and then your web server sees it as user_profile.php?id=foobar ... this is how Wordpress and other blogging software creates the short access names.

Life gets much easier if you're not writing and trying to maintain the state of dynamic content with static files. Static files suck.
__________________
Karl Katzke - Available for RHEL/CentOS admin, and small PHP/HTML/XHTML jobs.
karlkatzke is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

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

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 12:46 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums