Jump to content
Larry Ullman's Book Forums

koalajiang

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by koalajiang

  1. Hi Larry:

     

    I read the book twice and type all the code into my Netbeans IDE. The book works great for me, the instruciton of each script is simple and clear to understand.

     

    I did find a typo on page 621, line 138. the $_post['existing] should be replaced with $_post['artist'].

     

    I work through all the book details, actually I read each of you word in the book:). After test all the codes.

    I have 2 questions need to be clear:

     

    1) I use login practice which is on page 589, line 29. when I use pass=SHA1('$p') compare with encypt password stored in database. I always get failed results. I use hard code like pass='123', it works. It seems password through SHA1() function cannot be equals to the encypt password stores in user table when the user first registered. I double check the password length stores in db is >40. Why I always get failed results when using SHA1() function?

     

    2) The second question is on page 656 line 34. when you using mysqli_stmt_bind_param($stmt,'iiid',$oid,$pid,$qty,$price), the $oid you defined in checkout.php. But $pid,$qty,$price have not been retrieved from database or initialized. How do you write uninitilized varables into database? And it does work. I am confused about it.

  2. Hi Larry:

     

    You mentioned that The header.html is being included by PHP. Do you mean in the index.php file --

     

    <?php #  index.php

    $page_title = 'xxxxx';
    include ('./includes/header.html');
    ?>
     
    so that header.html code is part of the original php script?? If so why when i type php code in header.html file with netbeans, there is no code hint, and also the php code color is light blue?
×
×
  • Create New...