Jump to content

User Pages


jchamb2010

Recommended Posts

I don't think this has been posted before; but if i'm wrong please post a link to where it is. I think this is the correct section but I could be wrong; in which case please move it for me.

 

I'm looking for a script that allows users I specify to be able to login. In the members section I would like a text box for each person where they can put some HTML; and after hitting enter; the HTML code that they typed in there; would come up on a separate page; for instance userpages.yourdomain.com/username. And i would like it to have a different page for each user for instance

 

User 1 - userpages.yourdomain.com/user1

User 2 - userpages.yourdomain.com/user2

User 3 - userpages.yourdomain.com/user3

etc, etc

 

I already know someone is going to suggest allowing them to use FTP; i don't want this because first of all I only have 25 to spread around; and the Username Suffix is random numbers and letters. and i would like it do dissalow PHP

Link to comment
https://forums.phpfreaks.com/topic/95865-user-pages/
Share on other sites

yes; but only 1 not a website; just ONE webpage

 

And where are you stuck exactly? Its a simple process. Users signup and post the content of there page to a database. You then pass the users username through the url and use it in your query. eg;

 

showuserpage.php

<?php

  if (isset($_GET['uname'])) {
    $uname = mysql_real_escape_string($_GET['uname']);
    $sql = "SELECT page FROM userpages WHERE uname = '$uname'";
    // execute query and display the results
  }

?>

 

All you need then is a mod_rewrite rule such as....

 

RewriteRule ^(.*)$ showuserpage.php?uname=$1 [L]

 

Which will send request for...

 

http://yourdomain.com/thorpe

 

to....

 

http://yourdomain.com/showuserpage.php?uname=thorpe

Link to comment
https://forums.phpfreaks.com/topic/95865-user-pages/#findComment-490927
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.