Thread: GhettoLogin nutballs
You gotta love when you can use Ghetto in a function name and actually be a legitimate use.
This function does no enforcement, but it sets a session var "usertype". do your own enforcement from there. Just meant to be a quick and easy password login for a site that does not warrant a database. usage $security->ghettologin('nutballs','ghettopass',$_POST['user'],$_POST['pass'],'admin','/home. php');$security->ghettologin('perk','biglongultraparanoidpass',$_POST['user'],$_POST['pass'],' phpnerd','/home.php');function function ghettologin($validuser,$validpass,$user,$pass,$successusertype,$successtowhere='/') { //string as many of these 1 right after the other on a login page, as needed. if ($user != '' and $pass != '') { if ($validuser == $user and $validpass == $pass) { $this->loggedinusertype = $successusertype; $_SESSION['usertype'] = $successusertype; header('Location:'.$successtowhere); } } } perkiset
oh I can see a whole new batch of interestingly named functions on the horizon... go NBs!
nutballs
yep, it makes perfect sense to me. this is the most ghetto of login functions I have ever made. lol
but hell, it works. vsloathe
uber.
|
Thread Categories
Best of The Cache Home | ||
Search The Cache |
- Ajax
- Apache & mod_rewrite
- BlackHat SEO & Web Stuff
- C/++/#, Pascal etc.
- Database Stuff
- General & Non-Technical Discussion
- General programming, learning to code
- Javascript Discussions & Code
- Linux Related
- Mac, iPhone & OS-X Stuff
- Miscellaneous
- MS Windows Related
- PERL & Python Related
- PHP: Questions & Discussion
- PHP: Techniques, Classes & Examples
- Regular Expressions
- Uncategorized Threads