943,901 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 609
  • PHP RSS
Feb 23rd, 2008
0

switching between forms

Expand Post »
iam designing a login page..while validating the login ..i have to check whether the user is ordinary user or administrator...i have to display different page for each one..i did the validation process..but how to switch to administrator.php say if the user is an administrator..can i use <form> for this..
Similar Threads
Reputation Points: 8
Solved Threads: 1
Newbie Poster
gopi kannan is offline Offline
15 posts
since Jul 2007
Feb 23rd, 2008
0

Re: switching between forms

try to use page redirection to the required page after user validation

You can try this code

PHP Syntax (Toggle Plain Text)
  1.  
  2.  
  3.  
  4. if ($user="admin")
  5. {
  6. header('Location: admin.php');
  7. }
  8. else
  9. {
  10. header('Location: ordinary_user.php');
  11. }
Reputation Points: 11
Solved Threads: 2
Light Poster
tirivamwe is offline Offline
36 posts
since Oct 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Getting Radio Buttons to access Mysql Database
Next Thread in PHP Forum Timeline: Dynamic Declaration of Arrays Keys





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC