[No mysql]login script

Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    [No mysql]login script

    i maked a basic login script PHP/HTML
    no mysql requested rate it please

    sample : Untitled Document (delete if not allowed).

    id:test
    pw:1234

    Code:
    <html>
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="post" action="login.php">
      <label>
      Username 
      <input type="text" name="id" id="id" />
      </label>
      <p>
        Password
        <input type="password" name="pw" id="pw" />
      </p>
      <p>
        <label>
        <input type="submit" name="button" id="button" value="Login" />
        </label>
      </p>
    </form>
    </body>
    </html>
    PHP Code:
    <?php
    if($_POST['id'] == 'test' AND $_POST['pw'] == '1234'){
    echo 
    "welcome ";
    echo 
    $_POST['id'];
    }
    elseif(empty(
    $_POST['id']))
    {
    echo 
    "You left username field empty, Go back.";
    exit();

    elseif(empty(
    $_POST['pw']))
    {
    echo 
    "You left password field empty, Go back.";

    else 
    {
    echo 
    "You dont have right to login";
    }
    ?>
    Last edited by passie; 03-10-07 at 10:15 PM.


  2. #2
    Account Upgraded | Title Enabled! Available is offline
    MemberRank
    Jul 2007 Join Date
    MS-DOSLocation
    216Posts

    Re: [No mysql]login script

    Yes it works... But in-terms of security, I don't think that'll last.
    Last edited by Available; 02-10-07 at 06:51 PM.

  3. #3
    Account Upgraded | Title Enabled! yoni2 is offline
    MemberRank
    Nov 2006 Join Date
    Krommenie, NethLocation
    254Posts

    Re: [No mysql]login script

    Nice Script!!!![9/10] :P

  4. #4
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    Re: [No mysql]login script

    thanks yoni for great number.

  5. #5
    Apprentice Hacker is offline
    MemberRank
    Sep 2007 Join Date
    AustraliaLocation
    24Posts

    Re: [No mysql]login script

    Very nice. Brilliant script for logging in. I can't find my C++ program. Keeping it neat I see. Oh well, I will be of to look for a new C++ program. Fuck that.

    _Hacker

  6. #6
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    Re: [No mysql]login script

    thanks you Hacker for sweet command

  7. #7
    Account Upgraded | Title Enabled! Demote is offline
    MemberRank
    Sep 2007 Join Date
    In a house.Location
    917Posts

    Re: [No mysql]login script

    So where would all the name's and password's be stored?.
    --
    So you are only able to use one name and one password?

  8. #8
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    Re: [No mysql]login script

    can more but you have to edit the code
    just add under
    PHP Code:
    if($_POST['id'] == 'test' AND $_POST['pw'] == '1234'){
    echo 
    "welcome ";
    echo 
    $_POST['id'];

    under the }
    you place
    PHP Code:
    elseif($_POST['id'] == 'username2' AND $_POST['pw'] == 'password2'){
    echo 
    "welcome ";
    echo 
    $_POST['id'];

    Last edited by Mario_Party; 13-10-07 at 12:11 PM. Reason: edited your code as you missed a '

  9. #9
    Account Upgraded | Title Enabled! Demote is offline
    MemberRank
    Sep 2007 Join Date
    In a house.Location
    917Posts

    Re: [No mysql]login script

    So people wont be able to register, they will just have to use pre-givin username and password?.

  10. #10
    All is well... Wh005h is offline
    MemberRank
    Feb 2006 Join Date
    TejasLocation
    1,984Posts

    Re: [No mysql]login script

    lmmfao
    I would expect nothing more

    You have no idea how insecure that is =D
    I would be embarrassed to ask for a rating on this script

  11. #11
    Account Upgraded | Title Enabled! Demote is offline
    MemberRank
    Sep 2007 Join Date
    In a house.Location
    917Posts

    Re: [No mysql]login script

    @Wh005h, Lol love your comment.

    It would have to be insecure if it was HTML and had pre-arranged username and password's unless... umm... I dunno, would anyone bother using it?

  12. #12
    Gamma Daevius is offline
    MemberRank
    Jun 2007 Join Date
    NetherlandsLocation
    3,252Posts

    Re: [No mysql]login script

    I wouldnt ^^, if I need users to login it will be large ammounts and thus I would use a db. OR I use it for admin access only and than I would use the build-in authentication of browsers. Its not really a showcase, but whatever ^^

    And I agree with Wh005h :)

  13. #13
    All is well... Wh005h is offline
    MemberRank
    Feb 2006 Join Date
    TejasLocation
    1,984Posts

    Re: [No mysql]login script

    Here's some good suggestions so I can turn this into something productive hopefully lol
    1. Hash the password and compare hashes
    2. For account registration, have it write to a txt file and reference an exploded txt string to find logins
    3. Get, learn to use, and/or just use a database, it's not hard... If it was a mssql database I might could understand.

  14. #14
    Account Upgraded | Title Enabled! Demote is offline
    MemberRank
    Sep 2007 Join Date
    In a house.Location
    917Posts

    Re: [No mysql]login script

    Yeah basically someone could just view source and get username and password or if you encrypt they can decrypt, simple as pie.

  15. #15
    Account Upgraded | Title Enabled! passie is offline
    MemberRank
    Jan 2005 Join Date
    The NetherlandsLocation
    710Posts

    Re: [No mysql]login script

    its easy with database but i specially choose without database coz not everyone have that option if you get free database than its mostly slow ...
    this system is used for private not for everybody to register.



Page 1 of 2 12 LastLast

Advertisement