Announcements | Last Post | |
---|---|---|
SoC Curricula | 09/30/2017 01:08PM | |
Demarcation or scoping of examinations and assessment | 02/13/2017 07:59AM | |
School of Computing Short Learning Programmes | 11/24/2014 08:37AM | |
Unisa contact information | 07/28/2011 01:28PM |
Walkthrough 1 - PHP User Authentication August 07, 2011 12:35AM |
Registered: 13 years ago Posts: 159 Rating: 0 |
Language: SQLUPDATE login SET L2 = md5(';passwordTest';) WHERE L1 = ';usernameTest';;
Re: Walkthrough 1 - PHP User Authentication August 09, 2011 07:45PM |
Registered: 12 years ago Posts: 44 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 15, 2011 12:12PM |
Registered: 12 years ago Posts: 38 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 15, 2011 03:24PM |
Registered: 12 years ago Posts: 175 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 16, 2011 07:31AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
Re: Walkthrough 1 - PHP User Authentication August 16, 2011 09:32AM |
Registered: 12 years ago Posts: 175 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 16, 2011 06:33PM |
Registered: 12 years ago Posts: 67 Rating: 0 |
Language: PHPfunction quote_smart($value, $handle) { if (get_magic_quotes_gpc()) { $value = stripslashes($value); } if (!is_numeric($value)) { $value = "';" . mysql_real_escape_string($value, $handle) . "';"; } return $value;
Language: PHPquote_smart($uname, $db_handle); quote_smart($pword, $db_handle);
Re: Walkthrough 1 - PHP User Authentication August 17, 2011 06:45AM |
Admin Registered: 18 years ago Posts: 10,001 Rating: 353 |
is a requirement for the (MySQL) function mysql_real_escape_string. It requires the handle (consider it just the way the function is written)Language: PHP$db_handle = mysql_connect($server, $user_name, $pass_word);
Re: Walkthrough 1 - PHP User Authentication August 17, 2011 08:05AM |
Registered: 12 years ago Posts: 175 Rating: 0 |
Quote
Someone else else can write a class and all you need to know is what parameters you need to pass to it and what it does with those parameters. Saves you lot of time coding.
Re: Walkthrough 1 - PHP User Authentication August 20, 2011 09:55PM |
Registered: 12 years ago Posts: 27 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 23, 2011 06:52PM |
Registered: 12 years ago Posts: 67 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 24, 2011 07:49PM |
Registered: 12 years ago Posts: 23 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 24, 2011 09:29PM |
Registered: 12 years ago Posts: 67 Rating: 0 |
Quote
above link
The PHP crypt() function is a handy tool for encrypting passwords and other data requiring comparison of encrypted strings but not actual decryption
Re: Walkthrough 1 - PHP User Authentication August 25, 2011 08:32AM |
Registered: 12 years ago Posts: 175 Rating: 0 |
crypt() works in the same way as md5(), one way algorythms (hash), while md5() does only support md5-algorythm crypt() does support DES, MD5 and Blowfish (of course depending on the system PHP is built on).
The disadvantige to use crypt(), is that the system you are developint the PHP scripts on my support DES while the machine which you later on run the scripts on may not support DES and then your scripts won't work properly. Otherwise the two functions are quite the same.
md5() could encrypt password of an finite length, crypt() only up to 8 chars if I remember correctly.
Re: Walkthrough 1 - PHP User Authentication August 25, 2011 03:18PM |
Registered: 12 years ago Posts: 23 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication August 26, 2011 09:17PM |
Registered: 12 years ago Posts: 33 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication September 01, 2011 03:57PM |
Registered: 13 years ago Posts: 123 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication September 17, 2011 11:16AM |
Registered: 12 years ago Posts: 16 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication October 04, 2011 03:16PM |
Registered: 13 years ago Posts: 186 Rating: 0 |
Re: Walkthrough 1 - PHP User Authentication October 24, 2011 11:03AM |
Registered: 13 years ago Posts: 13 Rating: 0 |