need help please???with screename and passwords!!!

  • thepits
  • Born
  • Born
  • No Avatar
  • Joined: Mar 05, 2004
  • Posts: 1
  • Status: Offline

Post March 5th, 2004, 3:09 pm

Hello,
I am making a website to where people have to pay to get a year membership to my site. I need to set it to where after they pay with paypal they get to choose a screename and password,see i already got a web host and its almost up and running but my webhost told me that i have to put up a e-mail address to where costumers e-mail me and give me a screename and password that they want,and I have to put it in manually after they pay,I need the first to pages are free then everything else after that they have to pay for,I put password protect on my message board,but im trying to figure out how when they,enter there screename and password once,if they go to a different page they dont have to enter it again.I am trying to find out how i can setup my site to after they join they dont have to e-mail with a screename,they can just look thru and press in a screename and if it is already taken it will tell them that it's taken,and direct all there info into a file. Kind of like a porn site.
thank you for your time
my e-mail address is bergsr@frontiernet.net
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post March 5th, 2004, 3:09 pm

  • cipher
  • Graduate
  • Graduate
  • User avatar
  • Joined: Feb 11, 2004
  • Posts: 157
  • Status: Offline

Post March 6th, 2004, 6:54 pm

this is really hard to understand. but if you are trying to save user information then you will have to use sessions and/or cookies so that the users information is stored.
  • Inito
  • Graduate
  • Graduate
  • User avatar
  • Joined: Dec 30, 2003
  • Posts: 223
  • Status: Offline

Post March 7th, 2004, 11:28 am

For letting the user himself select a username and password, id suggest you to setup a MySQL Database,
and add the filled in username and password to a table.

Id make 3 columns:
- user_ID: int, auto_increment, Primary
- username: VARCHAR, 40(maximum of characters allowed in username)
- password: VARCHAR, 40(maximum of characters allowed in password)

And for recognition of a logged in user, I would use if(isset()) to check whether the cookie has been set, and if not, setcookie() to set a cookie, for instance with the name is_logged_in, holding the value 1

A tutorial for setcookie(): PHP Noise

Then check:
Code: [ Select ]
if($is_logged_in==1){
//...show page
}
  1. if($is_logged_in==1){
  2. //...show page
  3. }


DONT make it:

Code: [ Select ]
if($is_logged_in){
//...
}
  1. if($is_logged_in){
  2. //...
  3. }


cause then the cookie will never be set.

Hope this helps :wink:

Post Information

  • Total Posts in this topic: 3 posts
  • Users browsing this forum: No registered users and 179 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.