Jump to content
Larry Ullman's Book Forums

kravmaguy

Members
  • Posts

    10
  • Joined

  • Last visited

kravmaguy's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Ok I would propose that If anyone has all or part of these setup and population commands in text files please attach them here to this thread.
  2. Mr Ullman, can you please share a link to the source code in chapter 4-7 , I could not find it here
  3. Guys please remind me how I can leave a cookie on the users device so that when the user revisits a login form I will check for the existance of said cookie and if exists I will make the form fields sticky.
  4. This is a thread to over the questions and answers from the peruse section of chapter 2. I was not able to copy and paste directly into this text field so I will include it in a word document. All comments and corrections welcome. I will include the second part of the homework section shortly. Chapter2homework_part1.docx
  5. Your explanation clarified this for me thank you. And It makes alot of sense now. However can you please give your opinion on this thread : https://stackoverflow.com/questions/3230133/accessing-cookie-immediately-after-setcookie The first explanation makes sense he says that if you want immediate access, then you would do the following: setcookie('uname', $uname, time()+60*30); $_COOKIE['uname'] = $uname; This would be manually setting it, and I was curious why the method you outlined is better because if we used this, then we can modify that extra piece of validation code in the footer that checks if the page we are on is not login or logout. So setting it manually would be less secure?
  6. there is a function isadministrator() in an includes file which checks for the existence of a certain cookie, yet in the footer there are exceptions in his logic for the login and logout page. can someone please go over with me why its not working on these two pages: on login.php : basically when the pass and user is correct the server sends a cookie to the client but its not available to be read right away unless you refresh the page? on logout,php: destroys the cookie by setting it to false and its time in the past… so then why wouldnt isadministrator work? why does the browser still think the cookie exists? is this the same reason as on login.php page?
  7. It actually looks excellent on edge.. On firefox and chrome it looks horrible; I think i added some margins on the version in chapter 8 it made it look better, but its only on one of the pages, i didnt do it on every page, how can we fix this? edit: for some reason now its looking much better on chrome and firefox, cant remember what changes i made, but the problem of the no padding is now gone and its looking better across all three browsers. I will update this thread if any changes occur.
  8. I copied and pasted the concise.min code from github but i noticed a few odd things: There is no side margin when viewed on 100% only when its viewed on 80% see attached screenshot im using brackets and normally brackets will color code the text that it recognizes this is fine until halfway through the file, however the last half of the file is still in black text, why is that? see attached screenshot another student on the forums suggested exchanging the link to the cdn instead of using a local file, which i did, but now the site looks even wierder. See screenshot. So im not sure if the site is supposed to be looking like this or if ive made a mistake somewhere? I see im past the filesize allotment for this forum so here is a link to a public folder where i put the three screenshots: https://drive.google.com/drive/folders/1hPrkxu_EhFwnON24RJxWgy6hgDBgtDLd?usp=sharing
  9. I put in this code at the end of the exercise to try to help me understand it better, 1. when I print $books it gives me the entire array this i expected 2. print_r($book); only gives me the Last book? 3. print_r($chapter); prints all the books? 4. print_r($key); prints only the last key in the $chapters array which is really a book? 5. print_r($value); prints only the last value in the $chapters array which is value of the last $key I am hoping someone can explain this to me and why it does this. foreach ($books as $book => $chapter) { print "<p>$book"; foreach ($chapter as $key => $value){ print "</br>chapter $key is $value"; } print "</p>"; } echo '<pre>'; print_r($books); echo '</pre>'; echo '<pre>'; print_r($book); echo '</pre>'; echo '<pre>'; print_r($chapter); echo '</pre>'; echo '<pre>'; print_r($key); echo '</pre>'; echo '<pre>'; print_r($value); echo '</pre>'; ?>
×
×
  • Create New...