Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Multiple Admin Login (php), This is a script that doesnt requre SQL
Benz1435
post Mar 5 2005, 07:30 PM
Post #1


Member [Level 2]
*****

Group: Members
Posts: 76
Joined: 5-March 05
Member No.: 4,178



first off make a login.html page

Code:
QUOTE
<u>Admin Login</u><table border="0">
<tr>
<td><form name="form1" method="post" action="check.php">
<table width="407" border="0">
<tr>
<td width="105">Username:<br><input name="username" type="text" id="username"><br>
Password:<br><input name="password" type="password" id="password"></td>
</tr>
</table>
<br>
<input type="submit" name="Submit" value="Login">
</form>

</td>
</tr>
</table>


then make a check.php page

Code:
QUOTE
<?php
$admin1 = "admin1"; // first admin username
$adm_pass1 = "password1"; // first admin password

$admin2 = "admin2"; // second admin username
$adm_pass2 = "password2"; // second admin password

if(($username == $admin1 && $password == $adm_pass1) || ($username == $admin2 && $password == $adm_pass2)){
echo "Congratulations <i>" . $_POST['username'] . "</I><br>You may now proceed to the <a href=\"admin.php\">admin area</a>!";
}

else {
echo "Username <b>" . $_POST['username'] . "</b> or password <b>" . $_POST['password'] . "</b> is incorrect, please try again"; }
?>


Note: to make more than 2 admins just type this:
Code:
QUOTE
$admin3 = "admin3"; // second admin username
$adm_pass3 = "password3"; // second admin password


Under the other 2 admins names and password and this also:
Code:

QUOTE
|| ($username == $admin2 && $password == $adm_pass2) || ($username == $admin3 && $password == $adm_pass3)


then the admin area make it and save it as : admin.php

No Database Requred!!
Go to the top of the page
 
+Quote Post
beeseven
post Mar 6 2005, 02:09 AM
Post #2


Privileged Member
*********

Group: Members
Posts: 629
Joined: 26-February 05
Member No.: 3,995



It'd work, but is it really a good idea to store the admin passwords in an unencrypted file?
Go to the top of the page
 
+Quote Post
shadow skazi
post Mar 6 2005, 05:03 AM
Post #3


Member [Level 3]
******

Group: Members
Posts: 91
Joined: 20-December 04
Member No.: 2,823



QUOTE(beeseven @ Mar 5 2005, 09:09 PM)
It'd work, but is it really a good idea to store the admin passwords in an unencrypted file?
*



Yeah, that not safe at all. A good lure for hackers, expecially if you had an annonymous FTP.

But uhh...whatever floats your boat. laugh.gif
Go to the top of the page
 
+Quote Post
yasir
post Mar 6 2005, 02:05 PM
Post #4


Newbie [Level 1]
*

Group: Members
Posts: 12
Joined: 6-March 05
Member No.: 4,196



It could work well, but you need to work on the security issues a little more if you dont want hawk lurring down on you through it. Nice though.

Cheers!
Yasir smile.gif
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Make Yourself Admin On A Computer(28)
  2. Complete Login System(57)
  3. Php Simple Login Tutorial(63)
  4. Complete Login And Registration System(9)
  5. Php Quiz Script(20)
  6. How To Put A Phpbb Login Box On Your Main Site.(18)
  7. Email Script/form With Php(35)
  8. Simple Login In Visual Basic 6(6)
  9. Secure The Email Addresses On Your Website!(10)
  10. How To Make A Sig Rotator(85)
  11. Verifying Email Addresses(9)
  12. Automatic Login(5)
  13. Page Generation Time Script(17)
  14. Script To Build A List Of Links(2)
  15. Php Menu Bulding Script And Site Template(0)
  1. Php Script To Make A Link List(6)
  2. Installing Multiple Os On Your Pc(0)
  3. How To Protect A Directory From Being Viewed(4)
  4. How To: Ip Configuration Script (win Xp)(0)
  5. For ... Next Loops And Script Planning(2)
  6. How To Group Multiple Sets Of Data In Microsoft Excel 2007(0)
  7. Dynamic Signature - Yet Another Way To Do It(0)
  8. Image Rotator Script (another One)(0)
  9. Simple Php Login And Registration System(10)
  10. Background Image Swap Script(15)
  11. To Automatically Run Command When Login / Logoff(3)
  12. Start Multiple Programs With One Shortcut(15)
  13. [phpbb] Member Last-visit Report Script(0)


 



- Lo-Fi Version Time is now: 7th September 2008 - 12:04 PM