Latest

  • A Basic Lesson in Password Hashing

    Jul 01, 2009

    In the world of the web, lots of sites are popping up requiring users to login. When you need to do so, there's a bit more security than you might realize. You might be making a simple To-Do list, and might think:

    Security? Pfft, I'm not too worried about people's to-do lists being stolen.

    But what you didn't account for, is that all those username/password combinations a hacker just made off with? Yea, those are the same login's to important stuff, like e-mail , or bank accounts . Yikes!

    Read more »

  • Automagic Prefixes for Model Fields

    Jun 23, 2009

    Say we have a player model, and every field in playerstable is prepended with player_. For example, player_username, player_email, etc.

    I'm personally not used to this database design, but I know plenty of people use it. When I work on projects that have this, I'm not particularly found of having to write:

    
    $p = new Player;
    echo $p->player_username;

    I'd rather ditch the prepended part in all my PHP code.

    echo $p->username;

    Read more »

  • Copy Objects and Arrays with $unlink

    Jun 17, 2009

    Basically, if you don't know what happens when you have multiple variables pointing to the same Object or Array, then check out this quick and dirty article and read the first half or so. Or if you don't want to bother, I'll give you a snippet to paste into Firebug.


    var a = ['one','b',3,false];
    var b = a;
    a[1] = 'BEEEE';
    console.log(b[1]);

    Read more »

» Visit articles