| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| Web Marketing Specialist Join Date: Oct 2003 Location: Texas, USA
Posts: 1,335
![]() ![]() ![]() | Help with a small php login form I have Code: <?
$adminuser = "admin";
$clientuser = "client";
$adminpass = "admin";
$clientpass = "client";
if ($user == $adminpass&&$pw == $adminpass || $user == $clientuser&&$pw == $clientpass)
{
header("Location: http://my-website.com/partner_area/partner_area.php");
}
else
{
print("Wrong username or password. Please try again.");
}
?> |
| |
| | #2 (permalink) |
| Account Closed Join Date: Jan 2005 Location: root@localhost
Posts: 4,025
![]() | Code: <?
$adminuser = "admin";
$clientuser = "client";
$adminpass = "admin";
$clientpass = "client";
if ($user == $adminpass&&$pw == $adminpass)
{
header("Location: http://my-website.com/partner_area/admin_area.php");
}
else
{
print("Wrong username or password. Please try again.");
}
if ($user == $clientuser&&$pw == $clientpass)
{
header("Location: http://my-website.com/partner_area/client_area.php");
}
else
{
print("Wrong username or password. Please try again.");
}
?> |
| |
| | #3 (permalink) |
| NamePros Regular Join Date: Jul 2005 Location: Tucson, AZ
Posts: 689
![]() | Try this: Code: <?
$adminuser = "admin";
$clientuser = "client";
$adminpass = "admin";
$clientpass = "client";
if ($user == $adminpass&&$pw == $adminpass || $user == $clientuser&&$pw == $clientpass)
{
if( $user == $adminuser ) {
header( "Location: adminareaurl");
}
else {
header("Location: http://my-website.com/partner_area/partner_area.php");
}
}
else
{
print("Wrong username or password. Please try again.");
}
?> |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Googlism - What does google think of you? | deadserious | The Break Room | 55 | 12-15-2005 10:09 AM |
| Paypal Settlement | CMachuca | The Break Room | 3 | 07-31-2004 11:14 PM |
| PAYPAL Litigation | johnn | Domain Name Discussion | 6 | 07-31-2004 10:51 PM |
| Paypal Settlement | Lord | The Break Room | 2 | 07-30-2004 10:30 PM |