Jump to content

PHP Custom User Pages


rkumar1

Recommended Posts

Hi all, I am new to this forum and to PHP.  I have a question to ask about User Memberships and how to create custom user pages, so the users can check the status of an order.  Right now, I am able to have users log on to a central page.  I created this logon scheme using the tutorial on phpfreaks.com.  How do I have a user enter his logon credentials so he will be directed to his own custom page?  Thanks.

PS: If anyone can just provide a reference to a site where I could get this particular script that would be great!  Thanks again.

EDIT: I would also like to add that I have a phpmyadmin MYSQL database currently through 1&1. 
Link to comment
Share on other sites

I have a question about your custom page, what does that page actually do ?
At the moment I could only think of connecting database with the custom page, let's say ?page=1
Then after a person login, then you redirect them acount to their id, so let's say again the user id is 1, then it will be redirect to ?page=1

Btw.. This is just roughly an idea.
Link to comment
Share on other sites

The "central page" is the page immediately following the user login.  Instead of having this "central page," I would like each user to be able to login and then he/she will be directed to his/her own custom page.  I like the idea that hacker presented about having a unique user ID for each user, which will direct that user to his/her own page ID.  This page will display his/her name and will show the status of their job/order.  Also, I would like to be able to edit that custom user page, so I can send messages to the user.  Now, the problem I am having is trying to implement this kind of structure (script code, etc.).  Thanks again!
Link to comment
Share on other sites

Dear friend,
there are many methods/techniques that you can use for the desired result that you want. the simplest is to create a file and put it in the root directory for all users. then use the mkdir and filecopy techniques to copy that file to a newly created directory for your registered users or for anyone who logs in to your website. this  method is the simplest. and to secure your code from being used by others at the root level you can simply put <?php exit(); > at the first line to avoid anyone from viewing the page. and while copying the contents of this page which are typed below the <?php exit.... line you can make the thing work quiet easily. hope you get the point.
other method can be using database to store complete page scripts and running queries for each individual but it will be a bit difficult for an amateur PHP programmer. but you can give it a try.
Link to comment
Share on other sites

Thanks for the reply - I am considering a few options but I dont even know if ANY of them will work.
First what I am trying to accomplish (I dont think this is anything that hasnt been done before, actually Im sure it is quite common):
I want to make a page for each user who is a member of my site, this page will include a few basic things
1. A place for them to upload their personal files (photos mostly)
2. A place for them to keep track of basic checklists (forms)
3. A place for them to dump text (journal entries)
4. (the most dificult thing) - I want to track data for them and query that data and do calculations with it. An example of this is lets say I have a travel site where members can input how many miles theve flown and how much time it took and any given trip. I will them compile this info to provide them stats about how much they flew in a year, average flight time, etc. and repost it to THEIR page.

Stuff like that...

I dont know whether to store any/all of this in the DB or on pages etc. Im trying some sifferent things but running into trouble. I can make the pages easy enough and posting and pulling data to/from SQL is working well - the problem I have is figuring out a way to auto-generate a page for someone when they register and login (I am using the membership code offered here by phpfreak with some basic changes)

I have been a Front Page/basic HTML guy for about 5 years (no it's now how I earn a living ;)) but I am learning mySQL and PHP and some ASP...

Any thoughts are appreciated.
Link to comment
Share on other sites

Thanks so much for all the replies.  OCDOTCOM, i'm glad that i'm not the only one trying to figure this out!
Raza - I think I understand some of what you were saying, but would like some clarification.  Is there any pre-written script that I can refer to show me how to refer each user to his/her own custom page?  So, the point is to have each user register and then I will manually create their own page, but how would I manually change the script to refer that user to his/her own page?
Although I would like a completely automatic solution, I will have to settle for the easier option, since I do not have the time to learn much PHP/MySQL.  Thanks again for all the replies.
Link to comment
Share on other sites

Thanks everyone - Ive made a little progress on this. Yes the membership works great. On my successful login page I created a link to a "user member page" which is a generic php file that pulls (echo's) fields from the DB table. That work great but now I need to figure out how to implement forms etc. Im guessing html's w/includes are going to be the way to go?
Link to comment
Share on other sites

  • 2 weeks later...
Hi, does anyone have a pre-written script which can refer a user who logs in to a certain page based on his/her user ID?

Also, Hackerts: I have had my membership system working so far.  I can log users on to a central page, but I would like to know how to redirect a person based on their user ID to their own page. 

Thanks again!
Link to comment
Share on other sites

Hey guys!

I'm using the tutorial to create a membership on phpfreaks as well and I'm stuck on the script where all the data from the registry form is processed I used the example in the tutorial to test it out and just replaced the email address and the db.php file and put up the form. I tried it out and the page wouldn't come up right and had all these errors. I'm just wondering how you guys set up that script, it is VERY confusing.  ??? Thanks for any help!
Link to comment
Share on other sites

  • 2 months later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.