[PHP] Login Tutorial / No Mysql / DarkCoder

Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    Proficient Member Virtue~ is offline
    MemberRank
    Jul 2008 Join Date
    181Posts

    [PHP] Login Tutorial / No Mysql / DarkCoder

    My First tutorial on My New Series Of Php Tutorials.

    http://www.youtube.com/watch?v=pbg4rfvW4WI

    Discription:
    Code:
    Code: http://elitetactics.sytes.net/codes/index.php
    
    Please rate and subscribe for more.
    We would love it!
    
    This is a php tutorial for people tpo login to a certain file or show a certain text.
    
    %Tutorial
    %PHP
    %Html
    Please Subscribe :)


  2. #2
    Account Upgraded | Title Enabled! andrew951 is offline
    MemberRank
    Dec 2006 Join Date
    207Posts

    Re: [RELEASE] PHP Login Tutorial / No Mysql / DarkCoder

    very basic. should move to showcase

  3. #3
    Alpha Member Hammad is offline
    MemberRank
    May 2007 Join Date
    Great BritainLocation
    1,997Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Hmm...very useful for beginners like me in PHP. I actually learnt a lot from this, thanks!

  4. #4
    Fuck you, I'm a dragon Pieman is offline
    MemberRank
    Apr 2005 Join Date
    The NetherlandsLocation
    7,414Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Pretty basic, also if you're passing stuff like passwords through a form, NEVER use get it's very unsafe. Use post instead.

    Also, you're coding style is sloppy, it'll make your brain explode on big projects.

    This is how I would code it:

    PHP Code:
    <form name='password' action="test1.php?" method="post">
    Password: <input type="text" name="pass"><br />
    <input type="submit" value="Go!">
    <br /> </form>

    <?php
    $pass
    =$_POST['pass'];

    if (
    $pass == "dark") {

          echo 
    "Password Correct.";

    }
    ?>

  5. #5
    Hm. foxx is offline
    MemberRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,257Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    lol $_GET

  6. #6
    Alpha Member Hammad is offline
    MemberRank
    May 2007 Join Date
    Great BritainLocation
    1,997Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    What's wrong with $_GET?

  7. #7
    Hm. foxx is offline
    MemberRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,257Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    /page.php?pass=thisismypweveryonecankindaread

    tis s mush betta, not like you need md5 when you're not saving it anywhere though.
    PHP Code:
    $pass md5(ahoj);
    $post md5($_POST['pass']);

    if(
    $pass == $post)
    {
    echo 
    "ok";
    }
    else
    {
    echo 
    "wrong password, you fail";


  8. #8
    Banned Monsta. is offline
    BannedRank
    Jun 2008 Join Date
    England - MerseLocation
    1,221Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Foxx123, what does "ahoj" equal?

  9. #9
    Hm. foxx is offline
    MemberRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,257Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    it's czech hello .. hm and when I think about it, $pass = md5("ahoj");

  10. #10
    Account Upgraded | Title Enabled! Daney is offline
    MemberRank
    Jun 2007 Join Date
    1,110Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Ahoj Foxx :)

    Also, there are better ways of doing this, sessions etc. but good to learn the basics.

  11. #11
    Alpha Member Hammad is offline
    MemberRank
    May 2007 Join Date
    Great BritainLocation
    1,997Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Quote Originally Posted by Foxx123 View Post
    /page.php?pass=thisismypweveryonecankindaread

    tis s mush betta, not like you need md5 when you're not saving it anywhere though.
    PHP Code:
    $pass md5(ahoj);
    $post md5($_POST['pass']);

    if(
    $pass == $post)
    {
    echo 
    "ok";
    }
    else
    {
    echo 
    "wrong password, you fail";

    OK... but what's the
    PHP Code:
    $pass md5(ahoj); 
    there for?

  12. #12
    Hm. foxx is offline
    MemberRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,257Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    That's the password, md5() is a php function which makes it encoded.

  13. #13
    Alpha Member Hammad is offline
    MemberRank
    May 2007 Join Date
    Great BritainLocation
    1,997Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    But it says the password is 'pass'?

  14. #14
    Hm. foxx is offline
    MemberRank
    Sep 2006 Join Date
    Czech RepublicLocation
    5,257Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    nope, it says that the password is "ahoj",
    in that guide he did
    PHP Code:
    if ($pass == "dark") { 
    where "dark" is the password, i've only "stored" that password in a variable..
    in his guide it would be
    PHP Code:
    $password "dark";
    if (
    $pass == $password) { 

  15. #15
    Alpha Member Hammad is offline
    MemberRank
    May 2007 Join Date
    Great BritainLocation
    1,997Posts

    Re: [PHP] Login Tutorial / No Mysql / DarkCoder

    Aaah, I didn't see that.



Page 1 of 2 12 LastLast

Advertisement