So whats this all about?
For many years I trained and fenced three times a week and hot the gym daily - working in the gym helped greatly but the upshod of it all was that I was a (relatively) trim 12st 5lbs.
Enter 2 kids, wife and self employment - out goes the gym, out goes [...]
PSD File included for free download.
Have a play and be nice to Dave
Need a quick and dirty captcha?
session_start();
$str = str_shuffle(‘abcdefghijklmnopqrstuvwxyz0123456789′);
$substr = substr($str, 0, 6);
$im = imagecreate(60, 25);
// white background and blue text
$bg = imagecolorallocate($im, 255, 255, 255);
$textcolor = imagecolorallocate($im, 0, 0, 0);
[...]
Alrighty then, here goes with the first of what I hope will be many tutorials.
This is a BASIC login script that uses a MySQL database to log someone in.
It is by no means a complete, secure, authorising system so please dont come back with things like; “Your session security is rubbish” or “Why isnt this in full OO code?” - It’s a principle tutorial with working code done in a semi OOP/procedural fashion for the purposes of learning.
So here we go, most of the text is in the code - cut, paste and learn ![]()
Debugger Function:
Wrote this for a small CMS to return a nicel formatted error string.
Accepts either a string or Array as the argument and cn debug superglobals as well
(POST, SESSION, GET, COOKIE et al)
Give Dave the penguin a good home!!