Support Forums

Full Version: [PHP] Very Basic Login Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Great job ! Thanks Smile
Easy but cool ;)
So how's your ebook? =3

Anyway thanks for replying.
Thanks for the login page this will help me more Smile
(12-01-2011, 03:33 PM)SuhinderG Wrote: [ -> ]Please tell me this doesn't store in a text file.

LOLOLOLOLOLOL, that made me laugh,

Nothing wrong with storing in text files as long as you properly encrypt the data, and deny access to it via htaccess.
You could have used the empty() function instead of
PHP Code:
If ($_POST["text"] == "" || $_POST["pass"] == ""){ echo '<script>alert("Please enter something into the text boxes!")</script>'
(06-07-2012, 07:47 PM)RubiksHQ Wrote: [ -> ]You could have used the empty() function instead of
PHP Code:
If ($_POST["text"] == "" || $_POST["pass"] == ""){ echo '<script>alert("Please enter something into the text boxes!")</script>'

Technically speaking, empty is a language construct, not a function. The most obvious difference between a language construct (that requires parenthesis) and a function is that you are unable to have a variable as a name for it (unlike in a function).
PHP Code:
$a 'empty';
if(
$a($_POST['b'])) #invalid

$c 'trim';
$d $c($_POST['b']); #valid 
$c is known as a variable function now.

@BreShiE, there's no need for you to question if there is input in the third IF statement because the ELSE part of the second IF statement will make sure of that.
I'll use this for learning. I've been getting into PHP and MySQL lately. Thanks
The login details are directly saved, don't know what you guys tell about text files Whistle

@Rwkeith, it doesn't use a database.
Pages: 1 2