Jump to content
Larry Ullman's Book Forums

Recommended Posts

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.

Link to comment
Share on other sites

I'll look into that typo. Thanks for letting me know about it. As for your questions...

 

1) I'm not sure. If a hardcoded pass does work, that would suggest you're not storing a hashed version. 

 

2) So the way bound parameters work, is that the variables you bind only have to have a value when the statement is executed. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...