DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   hi (http://www.daniweb.com/forums/thread101081.html)

lydia21 Dec 13th, 2007 11:15 pm
hi
 
i have created a application ...when i give the URL of the second page the page is getting displayed...but i want all the user to enter the application only from the first page where it check whether the user is valid.... what should i do to make my application more secure

nav33n Dec 14th, 2007 12:16 am
Re: hi
 
Add sessions. If the user enters his username and password in the first page, add his username to the session(if he is a valid user). Then just add a condition,
 if(! isset($_SESSION['username'])){ echo " You have to go back to page 1 and enter your username..."; exit }

vssp Dec 14th, 2007 12:26 am
Re: hi
 
if session variable is blank using heder to function to redirect the page

lydia21 Dec 14th, 2007 1:33 am
Re: hi
 
2 Attachment(s)
hi,
it is displaying the print statement even if he is a valid user
if(! isset($_SESSION['username'])){ echo " You have to go back to page 1 and enter your username..."; exit ;}

i have attached the forms in which i tried...........

nav33n Dec 14th, 2007 1:40 am
Re: hi
 
:icon_rolleyes: In start1.php, you are adding name to the session. But in viewuser.php, you are checking for username !?!


All times are GMT -4. The time now is 2:45 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC