July 29, 200818 yr I know there are a few topics on login pages and register pages but I've got some questions. I'm creating a site where I want people to register up and be able to login. When they login, they will be taken to their profile page, where it will contain all the information they used when they signed up. So basically, could someone tell me how to do this on the register page. On this register page, I want the viewer to see this: Name: Simply just the first nameSurname: Just the surname Age: Age of person, input validated for integers Location: Where the person is from Image: Is it possible for this to be an upload form where people could upload their picture? I'm not quite sure. I would also like to add additional fields to this, so could someone tell me how to do that as well, they will just be text.
July 29, 200818 yr Are you trying to do this in MySQL/PHP? With the registration page you'll want to: A : Validate the input B : Put it into a database table C : Possibly have some sort of human validation (i.e. e-mail activation). To direct someone to a specific location (for example after they've logged in) you can send a HTTP request with: <?php header('Location: http://www.mysite.com/index.php?id=logged_in'); ?> Header requests need to be done before any output is sent, so above your DTD for example.
July 29, 200818 yr Author Thanks for replying but I managed to get that setup. However my logout page doesn't work. I've set up my session on the login page, with session start, and at the top of my members area, but when I do the session_destroy, I get an error message that looks like: Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in logout.php on line 2
July 30, 200818 yr Thanks for replying but I managed to get that setup. However my logout page doesn't work. I've set up my session on the login page, with session start, and at the top of my members area, but when I do the session_destroy, I get an error message that looks like: Is session_start(); included in the logout page? You have to start or maintain the session to destroy it.
July 30, 200818 yr Author Oh, I see. But will the session be therefore destroyed throughout the whole site?
July 30, 200818 yr The session and all session variables etc are destroyed with the session_destroy() function, yep. Edit: Note that sessions also end when a browser is closed.
Create an account or sign in to comment