Krishna Srikanth escribió:
> Hi Vishal,
>
> Hope this would be the simplest method of all.
> <?php
>
> $userID=escapeString($_POST['userID']);
>
> if($userID=='1' or $userID=='2' or $userID=='3')
> {
> //get name from database and put in session
> redirect('page1.php');
> }
> if($userID=='4' or $userID=='5' or $userID=='6')
> {
> //get name from database and put in session
> redirect('page2.php');
> }
>
> ?>
> and in page1.php
> <?php
> if($userID!='1' and $userID!='2' and $userID!='3')
> {
> echo 'Access denied'; exit;
> }
> else
> {
> //display content
> }
> ?>
>
> similarly check in page2.php
>
>
> Regards
> Manda Krishna Srikanth
> www.krishnasrikanth.com
>
> php-objects@yahoogroups.com wrote on 09/16/2008 12:58:42 PM:
>
>
>> "Vishal Subandh" <vishal.subandh@gmail.com>
>> Sent by: php-objects@yahoogroups.com
>>
>> 09/16/2008 12:58 PM
>>
>> Please respond to
>> php-objects@yahoogroups.com
>>
>> To
>>
>> php-objects@yahoogroups.com
>>
>> cc
>>
>> Subject
>>
>> [php-objects] Login page
>>
>> Hi folks,
>>
>> I am looking to create a login page. I have created 2 pages in php and
>>
> hence
>
>> defined two sets of users. I would like users 1,2 and 3 to access page A
>>
> and
>
>> 4,5 and 6 to access page B after signing in. How can I do this. I have
>>
> one
>
>> table at the moment that stores the name and type of user.
>>
>> I would even like to check for user validation!
>>
>> Kind regards,
>>
>> Vishal
>>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
> ------------------------------------
>
> Are you looking for a PHP job? Join the PHP Professionals directory Now!
> http://www.phpclasses.org/professionals/Yahoo! Groups Links
>
>
>
>
>
[Non-text portions of this message have been removed]
------------------------------------
Are you looking for a PHP job? Join the PHP Professionals directory Now!
http://www.phpclasses.org/professionals/Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-objects/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/php-objects/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:php-objects-digest@yahoogroups.com
mailto:php-objects-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
php-objects-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
No comments:
Post a Comment