mrkfox Posted May 2, 2009 Share Posted May 2, 2009 Hi, I'm pretty new to PHP and I'm currently trying to make a simple e-commerce website. I've got the basic regustration to work aswell as the ability to log in. Now this is where my problem starts. Currently the username text box, password text box and sig in button are loacted on a form on my index.php. Once i log in I'm redirected the a page called login.php which gives me the option to go back to the main index.php. I want to be able to display the message of succesful login on the same form that contains the text boxes and sign in button. Obviously i want to get rid of them before the message is displayed. I've figured out how to display the username once a user is logged in and that will also be displayed in the form. So basically what i want to achive: 1. Once sign in button is pressed both the username text box and password text box to dissapear with the sign in button. and be replaced with the username for the rest of the session. Once that is done i will create a log out button to end the session and again display the log in boxes and button. Thanks, Sorry for the long essay. Link to comment https://forums.phpfreaks.com/topic/156529-php-login/ Share on other sites More sharing options...
FMATeam Posted May 2, 2009 Share Posted May 2, 2009 if(isset($_SESSION['yoursessionname'])) { //what to do if user is signed in } else { //what to do if the user is not signed in } I don't know if this is what your looking for, your post was a little confusing ??? Link to comment https://forums.phpfreaks.com/topic/156529-php-login/#findComment-824214 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.