Jump to content
Larry Ullman's Book Forums

Emilie

Members
  • Content Count

    22
  • Joined

  • Last visited

  • Days Won

    9

Emilie last won the day on September 25 2014

Emilie had the most liked content!

Community Reputation

19 Good

About Emilie

  • Rank
    Member
  1. Hello, On this line, why are you using quotes and concatenation? if (isset($_POST['SiteTypeID']) && ($_POST['SiteTypeID'] == '. $key . ')) echo 'selected="selected">'; I hope this helps, Emilie
  2. Hello, Nick, This is exactly what you should NOT do in order to run a PHP file. Firefox is just a browser. It knows how to open and display the contents of HTML files, but on its own it doesn’t know what to do with a PHP file. For Firefox, a PHP file is just a text file, or a HTML file if your PHP is inside a HTML file, which is why it displays everything in this file, including your PHP code. For your PHP code to be run as such, the PHP file must be sent to your local server (XAMPP), where the PHP interpreter will parse the code and send it back to Firefox (as HTML), for Firefox to di
  3. I’m sure it is beneficial! And I hope I’ll see the light some day. ;-)
  4. Thanks for the tip. I’ll try this in my own projects! In theory, I agree. But I don’t know why, absolute paths usually don’t work for me for URIs. Absolute URLs work fine, absolute URIs don’t, and I really can’t understand why.
  5. Hello, hwadler, Paths are one of the real pains of web programming! Your best bet is to create constants for the different paths you will need for your projects. Let’s say my files are organised like this: root_folder index.php includes // I actually use another, less obvious name config.inc.php header.php navigation.php footer.php css styles.css images js pages_folder some_page.php sub_folder some_other_page.php I define the following paths : if ($_SERVER['HTTP_HOST'] == 'localhost:8888') {
  6. Hello, I understand. In order to avoid this kind of problem, just use the 'code' tags: the icon is in the middle on the bottom line and looks like this: < > It will also apply syntax coloring, which helps read the code. I hope this helps, Emilie
  7. Hello, You repeatedly used semi-colons instead of ampersands in the URLs : echo '<a href="view_users95.php?s=' . ($start - $display) . ';p=' . $pages . ';sort=' . $sort .'">Previous</a> '; Check all your URLs! I hope this helps, Emilie
  8. Hello, Another typo: ContractWitnessed='0, The closing quotation mark is missing. Also, if your ID is numeric, you should not quote it: where (ID='23') If this doesn't do the trick, I would suggest testing a few lines only at a time, until you find where the query goes wrong. I hope this helps, Emilie
  9. Hello, There's a typo in the line you highlighted in red: you forgot the concatenation dots around $image[3]: echo "<div align=\"center\"><img src=\"images?image=$pid&name=" . urlencode($row['image_name']) . "\" . $image[3] . alt=\"{$row['print_name']}\" /></div>\n"; I hope this helps, Emilie
  10. Hello, MySQL doesn't 'know' the variables you created with PHP. In order to test your query, you need to replace the variables with their values. I hope this helps, Emilie
  11. I see what you mean. I hadn't thought of that, because I'm not concerned with the book being viewed from the web, at least for the time being. I only needed some means of opening those huge HTML files and editing them. I'm just an amateur programmer, so I first tried to open this 70 MB file with my usual text editor (BBEdit), and although I've been able to edit a 350 MB file with BBEdit (although very, very slowly), I couldn't open this 70 MB file with BBEdit. I was going through Larry Ullman's "Advanced PHP" book at the time, and through chapter 12 more specifically, so I just thought I w
  12. Not all that insane since it represents a whole book and 7 MB was before minimizing the file. Look at the digital versions of computer books, and you'll see they are 10 to 50 MB. The HTML file is the largest file within an ebook format (ePub, mobi, etc.).
  13. Hello, HartleySan, This 70 Mb HTML file was probably created with Word or some other unsuitable application. Hence loads of unnecessary style attributes inside HTML elements, empty div elements, duplicate links (some appeared up to 20 times on one line). After "cleaning", it became approximately a 7 Mb file! Emilie
  14. Hello, I think you can leave them as they are for now. If there are exercises where you need the registration date, you can change the registration date for some of them then, or add users so as to have a diversity of registration dates. Emilie
  15. Hello, What is "wrong", according to you? The registration date is the same for all users because you entered all of them at one go into the database, and therefore the timestamp corresponding to NOW() is the same for everyone. Because of that, ordering the results by registration_date DESC has no real meaning. I hope this helps, Emilie
×
×
  • Create New...