Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Josee

  1. You can get the first chapter from Amazon as a Kindle version that can be read in the Kindle application (a free application that can be used on iPhones, iPads, Macintosh and computers using Windows).
  2. Hello, Larry, I don't think that "a bad e-book reflects poorly" on you or any author. It reflects badly on publishers. And I can't see any other reason, on their part, for selling protected PDFs than trying to avoid pirate versions. Which they don't. That's just the point I'm trying to make: given the number of pirate versions on the web, pirates have obviously found ways round the protections. These protected PDFs are only annoying to ordinary, paying customers who just want to use a book as a book, and a computer as a computer. I don't think there's any justification to treating all e-bo
  3. Oh, yes, I wrote, cancelling the order and explaining precisely why. Well, that's one book for which I'll be reading the printed version!
  4. That's really a matter of taste, of course. I never forget which ebooks I have, and for programming books I really prefer ebooks. As I've got a large screen, I keep the ebook on one side of the screen, my text editor next to it, and can easily alternate between reading and testing. I've also discovered that I can't change the file preferences so as to choose the zooming factor once for all, and indicate where I stopped reading so that the file opens at the right page on the next day. Did you say "they may be living in the past"? With a vengeance! (Mine…)
  5. Sadly, I've just cancelled my order, for in the meanwhile I've discovered that Peachpit and I don't have the same conception of e-books. To them, e-books are apparently just pictures of printed books that you can read on a computer, iPad, etc. To me, they should be numerical books that I can use as I want, which means — adding bookmarks, — adding links within the file and with other files, — copying a few lines to paste them in another file. You can't do any of these things in their PDFs. To be fair, you can add comments and notes, which is good. But it's not enough for me, especially w
  6. Hello, You should be able to use variables. For instance, here is what I do for the "description" meta tag, and for the CSS files: • In the header: <meta name="description" content="<?php print $meta_description ?>" <link rel="stylesheet" type="text/css" href="<?php print BASE_URL.$style ?>" /> • Near the top of each page: $meta_description = "Some description"; $style = 'css/some_file.css'; I hope this helps,
  7. Hello, everyone, Peachpit (the publisher of Larry's books) has the following offer at the moment: I'm just mentioning this because it applies to Larry's JavaScript book (ebook version only). Although its official publication date is 22 February and it's only on pre-order yet, you can include it in the two or three ebooks entitled to this discount. In case you hadn't guessed, I'm really looking forward to reading this book!
  8. For your forms to accept French diacritics, you just need to add them to the regular expression, like this (since the match is case insensitive, no need to add lower-case characters): preg_match('/^[A-Z ÀÂÄÆÇÈÉÊËÎÏÔŒÙÛÜŸ\'.-]{2,20}$/i', $_POST['first_name']) And if you want them to accept all European languages using the Latin alphabet, this should do it (all on one line, of course): preg_match('/^[A-Z ÀÁÂÃÄĀĂĄÅÆÇĆĈĊČĎĐÐÈÉÊËĒĔĖĘĚĜĞĠĢĤĦÌÍÎÏĨĪĬĮİ IJĴĶĸĹĻĽĿŁÑŃŅŇʼnŊÒÓÔÕØŌŎŐŒŔŖŘߌŜŞŠŢŤŦÙÚÛÜŨŪŬŮŰŲŴÝŸŶŹŻŽſÞð\'.-] {2,20}$/i', $_POST['first_name']) I hope this helps,
  9. Would the problem be that you are defining $bg after this line, instead of before? $data .= join('</td><td>', $row)."</td></tr>\n<tr bgcolor=\"'.$bg.'\"><td>"; I hope this helps,
  10. I think your mistake is that you are just opening the file in your browser (if that's the case, the address begins with file://) instead of running it through your local server (in that case, the address begins with http://, and probably looks like http://localhost:8888/directory/predefined.php). You need to run it through your XAMPP server so that the server can interpret the PHP code. See Larry's explanations on page 4. I hope this helps,
  11. By the way, this: echo"<option value=\"$service\" if(isset($clientOption)&&($clientOption==$service))echo'selected=\"Selected\"';>$service</option>\n"; couldn't work since you had twice echo.
  12. Hello, Zrakot, Try this script from different locations (on your computer/local host, on your webhost's server, and in different folders). It should help you with URIs and URLs: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Server test</title> <style type="text/css"> .bleu { color: #2200cc; /* blue */ } h2 { margin-
  13. You still need to delete the quotation mark at the beginning of the query. That's why the error message shows """ at the beginning of your query. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"SELECT c.comment, DATE_FORMAT(c.dateSub, '%M, %Y') AS ds, CONCAT(u.firstName, '' at line 1
  14. in script '/homepages/41/d12345679/htdocs/mysite/login5/htdocs/register.php' on line 10: require(/kunden/homepages/41/d12345679/htdocs/mysite./mysqli_connect.php) [function.require]: failed to open stream: No such file or directory It just means that on line 10 of the register.php file you are not giving the right path (URI) for your mysqli_connect.php file. And this is probably because this URI should not include htdocs/. It should probably end with d12345679/mysite/mysqli_connect.php. This topic from the previous forum may help you (see neil_g_cnd's answer, nearly at the bottom of th
  15. Hello, Marie, Your server probably has Magic Quotes on. Look at the escape_data() function at the bottom of page 55. It will show you both how to check that this is the case – just echo the result of if (get_magic_quotes_gpc( )) – and how to solve the problem once for all. But, since you are from Canada, also note that the regular expression, as it is, won't allow for French names with diacritics, such as "Jean-François Desfossés". It only allows the English alphabet.
  16. Have you tried using stripslashes()? Like this for instance: if (preg_match ('/^[A-Z \'.-]{2,20}$/i', stripslashes($_POST['first_name']))) I hope this helps,
  17. Hello, roberts, I think one solution would be to add "multiple" to your dropdown menu, so that "season" would become an array instead of a scalar value. Instead of: <select name="season"><?php $physios=array( "All" => "All employees", "Chefs" => "Chefs", "Wait" => "Wait" ); you would have: <select name="season[]" multiple="multiple" size="2"><?php $physios=array("Chefs" => "Chefs", "Wait" => "Wait"); Thanks to "multiple", users can select either one or both options. 'Size="2"' means two lines will be visible in your drop-down me
  18. <p><b>Name:</b> <input type="text" name="product_name" size="30" maxlength="60" value="<?php if (isset($_POST['reviewer_name'])) echo htmlspecialchars($_POST['reviewer_name']); ?>" /> You can use a nickname</p> Shouldn't it be name="reviewer_name"? I hope this helps,
  19. I think Larry's answer to this topic: http://www.larryullm...ch__1#entry3629 may help you too. It's similar to Paul Swanson's suggestion. I hope this helps,
  20. Thank you, Larry. Your solution is perfect for me. What would be your reservations about auto-generating the labels?
  21. Hello, First, my very best wishes to everyone for this new year 2012. … And my first question for 2012! I'm trying to enlarge the create_form_input() function from chapter 4 so that it also takes care of labels. I've managed to do practically everything I want it to do, except that I would like the $label_text argument to have a default value, and I haven't found a solution yet. The idea is that the label text would be based on the $name variable in this way: $label_text = ucwords(str_replace('_', ' ', $name)); If there was only English to be taken into account, I could just hard
  22. If I understand your question, you'd like to base a classified ads website on the code used by Larry for his forum examples? If you can find a copy of Larry's book at the library, either the 3rd or the 4th edition, it will indeed help you create all the functionality you describe. But, if you are new to PHP and MySQL (or any other database system), be prepared to read the book and learn from chapter 1. Without any previous knowledge, you can't start directly with chapter 15 ("Example–Message Board") from the 3rd edition, for instance, or at least it's not the easiest way of learning all that'
  23. Thank you, Larry. I "knew" there had to be a simpler solution. The next step, of course, will be to see if I can still get it to work when I use variables instead of static values. But I didn't think you could use "foreign" values in such a case. This opens up new vistas for me.
  24. If you use UTF-8 in your database and in your php files, you should also have a look at the multibyte functions. For instance, if you want to make a string uppercase, you shouldn't use the strtoupper function, but the mb_strtoupper function instead. Test this, and you'll see why! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Set locale</title
  • Create New...