Prev | Current Page 387 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

If you want to use hashing now, you need to store the hash value of the password in
the config file instead of storing the password in clear text (tshirtshopadmin, in this case). At login time,
you compare the hash value of the string entered by the user to the hash value you saved in config.php.
You can calculate the hash value of a string by applying the sha1 function to it (the sha1 function calculates
the hash value using the SHA1 algorithm). Don??™t worry if this sounds too advanced at this moment, Chapter 16
will show you the process in more detail.
7. Now, we??™ll create the admin_login componentized template, which displays the login box. Start by creating
the presentation/templates/admin_login.tpl file, and then add the following code to it:
{* admin_login.tpl *}
{load_presentation_object filename="admin_login" assign="obj"}

8.


Pages:
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399
Wczasy nad morzem kasyno kino azjatyckie bwin out of home advertising