Jump to content
Larry Ullman's Book Forums

timpearson26

Members
  • Content Count

    21
  • Joined

  • Last visited

  • Days Won

    1

timpearson26 last won the day on December 28 2011

timpearson26 had the most liked content!

Community Reputation

3 Neutral

About timpearson26

  • Rank
    Member
  1. I have recently finished your book PHP for the web and am now starting this new book. When I originally installed MAMP on my computer quite a few months ago, I installed mysql version 5.1.xx. I noticed now in this book that your are using mysql version 5.5.8. Is there any reason to update mysql to the latest version? I looked just briefly on the internet for a how to and it didn't seem to be very straightforward. Any suggestions? Thanks. Tim
  2. The more I am reading about security, the more this seems to become clear. Pretty much what I've learned is: nothing is totally safe.
  3. Thanks for the reply. Yeah, I already have the next book, looking forward to starting it soon. Thanks.
  4. In the Chapter 13 web app, cookies are used to verify if a person has administrator access. It seems that using a cookie is similar to a password in the way that in the book, Larry says to set a cookie with sort of a random name and value. For instance, don't set a cookie with the name of 'login' and the value of 'true' (instead a cookie named Samuel is set with a value of Clemens). But, because cookies are easily viewed once they are set, for example using firebug on firefox, it seems like this is not the best method for veirifying who has access to a site and who doesn't. For exa
  5. It sounds like you are not using a web server program on your computer. Are you running XAMPP or MAMPP? If not your scripts will not work. You cannot just open them in a web browser, you first have to have a server read the PHP code which will then send the html to the browser.
  6. the last pursue question says: use the combination of writing to and reading from text files, plus either sessions or cookies, to create a real registration and login system. I am having a problem wrapping my head around the concept of using the session in the registration process and how you would make this unique to the person logging in. What i understand so far is this: - when a person registers, their username and password gets written to a file - when they loggin the script checks the just entered username and password to see if it matches with a username and pass on fil
  7. Chapter 11 prusue #4 says: Change add_quote.php so that it takes the quotation and the attribution as separate inputs and writes them separately to the text file. Then modify view_quote.php so that it retrieves and displays both the pieces of data. What does it mean by the 'attribution'? Thanks Tim
  8. Yeah, probably wouldn't be fair if you answer it Still thinking about this one. I think I am going to move on for now and come back to it later. Tim
  9. Do you understand how the 'if' conditional works? When writing the 'if' conditional, if whatever is in the parentheses is TRUE, the following lines of code will be executed. But if whatever is in the parentheses is FALSE, the following lines of code will not be executed. For example: if (1 == 1) { print '<p>You have been successfully registered (but not really).</p>'; } (this above example will print) but this example: if (1 == 2) { print '<p>You have been successfully registered (but not really).</p>'; } this will not print because, o
  10. I am just starting Chapter 10 Pursue #4 now and am still brain storming. Just curious what others came up with? BTW Purse #4 reads: come up with an idea for, create, and use your own custom function. Tim
  11. Wow, just got through reading all of the back and forth here. Now my brain hurts I got the same answer as phpRob for the pursue #3. However, it looks to me that April, you did not correctly answer the Pursue #2 question. (also phpRob, your above script doesn't answer Pursue #2 question, but perhaps you were just intending to answer #3 and you left the code out for the #2 answer for simplicity, not sure). Anyway the code that I came up with that answers Pursue #2 and #3 is this: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3org/TR/xhtml1/DTD/xhtml1-
  12. Can you give the page number in the book your referring to. If I remember, I think that form validation is all part of an 'if' conditional. So if $okay = FALSE then the the conditional will be false and the success message won't print. Not sure if thats correct or not, I'm sure you'll get more clarification when you give the page number. Tim
  13. Thanks. Yeah I stopped for the night just before the 'Variable Scope' section . After just reading it, it makes a lot more sense. What exactly answered my question was this: page 279: Function variables - the arguments of a function as well as any ariables defined within the function - exist only within that function and aren't accessible outside of it. also page 280: Because of variable scope, a local variable within a function is a different entity than a variable outside of the function, even if the two variables use the exact same name. Thanks.
×
×
  • Create New...