haruncpi Posted November 1, 2012 Share Posted November 1, 2012 I have a login function in my site http://www.learn24bd.com. In my database every register member has their data, Like name,e-mail,etc. At the time of login user needs to put his/her email and password.I wanna if a user login successfully, a message will display on login success page Welcome (The name which has saved in my database in name field) Example: Welcome MD.Harun-Ur-Rashid Please any body help me. Link to comment Share on other sites More sharing options...
birbal Posted November 1, 2012 Share Posted November 1, 2012 when a user successfully logged in set the name of user from database in session. and display it where you want. http://w3schools.com/php/php_session.asp Link to comment Share on other sites More sharing options...
thescientist Posted November 1, 2012 Share Posted November 1, 2012 where's your code? What problem are you having trouble with? Link to comment Share on other sites More sharing options...
haruncpi Posted November 1, 2012 Author Share Posted November 1, 2012 where's your code? What problem are you having trouble with? <?phpsession_start();if(isset($_SESSION['a']))echo $row['name'];elseheader("location:b.php"); ?> it nothing happend Link to comment Share on other sites More sharing options...
justsomeguy Posted November 1, 2012 Share Posted November 1, 2012 $row is undefined. You need to get that data from the database. Link to comment Share on other sites More sharing options...
haruncpi Posted November 4, 2012 Author Share Posted November 4, 2012 Thx to all Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now