hi

Reply

Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

hi

 
0
  #1
Dec 13th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,746
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: hi

 
0
  #2
Dec 14th, 2007
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,
  1. if(! isset($_SESSION['username'])){ echo " You have to go back to page 1 and enter your username..."; exit }
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 197
Reputation: vssp has a little shameless behaviour in the past 
Solved Threads: 5
vssp vssp is offline Offline
Junior Poster

Re: hi

 
0
  #3
Dec 14th, 2007
if session variable is blank using heder to function to redirect the page
Thanks
VSSP
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 183
Reputation: lydia21 is an unknown quantity at this point 
Solved Threads: 5
lydia21 lydia21 is offline Offline
Junior Poster

Re: hi

 
0
  #4
Dec 14th, 2007
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...........
Attached Files
File Type: php start1.php (481 Bytes, 2 views)
File Type: php viewuser.php (1.4 KB, 2 views)
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 3,746
Reputation: nav33n is a jewel in the rough nav33n is a jewel in the rough nav33n is a jewel in the rough 
Solved Threads: 331
Moderator
Featured Poster
nav33n's Avatar
nav33n nav33n is offline Offline
Senior Poster

Re: hi

 
0
  #5
Dec 14th, 2007
In start1.php, you are adding name to the session. But in viewuser.php, you are checking for username !?!
Ignorance is definitely not bliss!

*PM asking for help will be ignored*
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC