Jump to content


Photo

PHP Custom User Pages


  • Please log in to reply
15 replies to this topic

#1 rkumar1

rkumar1
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 August 2006 - 12:47 AM

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. 

#2 onthespot

onthespot
  • Members
  • PipPipPip
  • Advanced Member
  • 424 posts

Posted 14 August 2006 - 01:03 AM

what is your central page? is this central page the first page your viewers see when they log in?

#3 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 14 August 2006 - 08:29 AM

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.

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#4 rkumar1

rkumar1
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 14 August 2006 - 08:33 PM

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!

#5 rkumar1

rkumar1
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 15 August 2006 - 08:15 PM

Is there any script which can generate a new custom user page when that user signs up?  For example user 3399 will get pageid 3399.  Thanks.

#6 ocdotcom

ocdotcom
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 15 August 2006 - 10:12 PM

Ive been trying to figure this one out as well! Help please :)
Ill post some fo my code if I get it half-way straightened out.

#7 raza.shahzad

raza.shahzad
  • Members
  • PipPip
  • Member
  • 23 posts

Posted 15 August 2006 - 11:08 PM

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.

#8 ocdotcom

ocdotcom
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 16 August 2006 - 12:01 AM

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.

#9 rkumar1

rkumar1
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 16 August 2006 - 03:47 AM

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.

#10 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 16 August 2006 - 04:51 AM

It can be done through MySQL, but before that just a question..
Have you had your membership working already ?

Hmm.. If I have the free time, I will try to help out on scripting.. I having examinations now.. It should ended at next week..

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#11 ocdotcom

ocdotcom
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 16 August 2006 - 07:52 PM

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?

#12 rkumar1

rkumar1
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 24 August 2006 - 08:15 PM

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!

#13 CircularStopSign

CircularStopSign
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 25 August 2006 - 02:58 AM

im trying to figure out the same thing bro

#14 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 25 August 2006 - 04:19 AM

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!

#15 CircularStopSign

CircularStopSign
  • Members
  • PipPipPip
  • Advanced Member
  • 44 posts

Posted 25 August 2006 - 05:05 AM

post a new thread

#16 jwk811

jwk811
  • Members
  • PipPipPip
  • Advanced Member
  • 714 posts

Posted 26 October 2006 - 06:33 PM

maybe you could make custom pages by adding variables into the url for a specific user and using the GET method to retrieve the data




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users