Jump to content
Larry Ullman's Book Forums

Josee

Members
  • Posts

    111
  • Joined

  • Last visited

  • Days Won

    6

Josee last won the day on February 19 2012

Josee had the most liked content!

Josee's Achievements

Newbie

Newbie (1/14)

38

Reputation

  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-book readers as potential thieves just because a few of them may be. I finally bought the Kindle version. It's just as bad, from my point of view, as a protected PDF (the limitations are more or less the same), but the printed version is not yet available in France and no date is given. I was just surprised to find that reading a Kindle version on a computer (I haven't got a Kindle) is actually better in some ways than reading a PDF, because the Kindle version is "responsive": it adapts to the viewport width.
  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 when I've made a point of buying the books, instead of just looking for pirate versions on the web.
  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-top: 2em; margin-bottom: 0.7em; } h3 { margin-top: 1.2em; margin-bottom: 0.5em; } p { margin-top: 0 } </style> </head> <body> <h3>IP address of the server host</h3> <p><span class="bleu">$_SERVER['SERVER_ADDR']</span> = <?php echo $_SERVER['SERVER_ADDR'] ?> </p> <h3>Server name</h3> <p><span class="bleu">$_SERVER['SERVER_NAME']</span> = <?php echo $_SERVER['SERVER_NAME'] ?> </p> <h2>URIs</h2> <h3>Root folder</h3> <p>(PHP manual: "The document root directory under which the current script is executing, as defined in the server's configuration file.")<br /> <span class="bleu">$_SERVER['DOCUMENT_ROOT']</span> = <?php echo $_SERVER['DOCUMENT_ROOT'] ?> </p> <h3>Absolute path for this script from root folder</h3> <p>(PHP manual: "The filename of the currently executing script, relative to the document root.")<br /> <span class="bleu">$_SERVER['PHP_SELF']</span> = <?php echo $_SERVER['PHP_SELF'] ?> </p> <h3>Absolute path for this script</h3> <p><span class="bleu">$_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF']</span> = <?php echo $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'] ?> </p> <h3>Absolute pathname of the currently executing script</h3> <p><span class="bleu">$_SERVER['SCRIPT_FILENAME']</span> = <?php echo $_SERVER['SCRIPT_FILENAME'] ?> </p> <h3>Current script's path</h3> <p>(PHP manual: This is useful for pages which need to point to themselves. The __FILE__ constant contains the full path and filename of the current (i.e. included) file.)<br /> <span class="bleu">$_SERVER['SCRIPT_NAME']</span> = <?php echo $_SERVER['SCRIPT_NAME'] ?> </p> <h3>Folder where this script is kept</h3> <p><span class="bleu">dirname($_SERVER['PHP_SELF'])</span> = <?php echo dirname($_SERVER['PHP_SELF']) ?> </p> <h2>URLs</h2> <h3>Host name</h3> <p>(PHP manual: Contents of the <em>Host</em>: header from the current request, if there is one.)<br /> <span class="bleu">$_SERVER['HTTP_HOST']</span> = <?php echo $_SERVER['HTTP_HOST'] ?> </p> <h3>Complete URL</h3> <p><span class="bleu">$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']</span> <?php echo $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'] ?> </p> <h2>User's IP Address</h2> <p>(PHP manual: "The IP address from which the user is viewing the current page.")<br /> <span class="bleu">$_SERVER['REMOTE_ADDR']</span> = <?php echo $_SERVER['REMOTE_ADDR'] ?> </p> </body> </html>
  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 the page). I hope this helps,
×
×
  • Create New...