Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About hallaplay835

  • Rank
  1. Oh, I see. Not sure if we wouldn't want to display an error message in case it is an E_RECOVERABLE_ERROR, PHP manual should give examples of each type of error and not just an abstract description. But now your version makes sense; should have looked into this further before posting. Also ignore what I said in my earlier post, E_STRICT errors wouldn't cause the error message to be displayed, don't know where my logic went wrong. Nevertheless, this should have been mentioned in the book; maybe you'll want to include it in your upcoming edition. By the way, Larry, I have not gone into this o
  2. Hey there. On pages 52 (where the script is displayed) and 56 (where the steps are outlined), in the error handling function, a conditional checks to see whether the error type is either E_NOTICE or E_STRICT. If they are, Larry suggests "no message error should be printed, as the error is likely not interfering with the operation of the page". Since PHP 5 the E_STRICT constant has had a value of 2048, so the conditional should check whether $e_number equals 2048 for this type of error. Shouldn't then the conditional printed in the book: if (($e_number != E_NOTICE) && ($e_nu
  3. HartleySan, you can always use CSS attribute selectors to target specific elements with certain attributes; this way there is no need to add unnecessary markup that will make it less semantic. So in your CSS file you would write: ‚Äčinput[type="radio"] { /* CSS declarations.*/ } CSS attribute (and value) selectors are a neat way of achieving this. They have been around for lots of time now (CSS2), it is just that people do not use them much. They are supported by every major browser, including IE > 6. CSS3 advanced pseudo-selectors can offer better ways of targetting specific
  4. Larry, in your 4th edition of PHP and MySQL for Dynamic Web Sites, you use several times the FILTER_VALIDATE_INT filter with the filter_var() function in order to validate form input as positive integers (that is, natural numbers excluding zero, depending on whether you count zero as a natural number). To accomplish this you write in your book: filter_var($var, FILTER_VALIDATE_INT, array('min_range' => 1)) However, according to the PHP function reference, the third argument passed to the filter_var() function needs to be an associative array named $options. Inside this array yo
  5. Hi, I do not know where is the error. According to the PHP manual, ceil() will "return the next highest integer by rounding up the provided value if necessary". According to the code, if $display = 5, and $total_records = 15, then $pages should be equal to 3, as there will be no remainder from the division and the ceil() function should not have an effect (resulting an integer). I do not see what is the use of testing for the remainder of the division using the ternary operator as there should be no effect whatsoever. I have even tried out the code myself and it seems to be working fine,
  • Create New...