Jump to content
Larry Ullman's Book Forums

rob

Members
  • Posts

    143
  • Joined

  • Last visited

  • Days Won

    16

Everything posted by rob

  1. Just use the path information for the value: C:/xampp/htdocs
  2. Put the following code in any file that's in htdocs that you can run via the browser, copy the value you see on the page and paste it into the config file as your value for BASE_URI. echo 'Document root: ' . $_SERVER['DOCUMENT_ROOT']; If you're new to PHP this book could be difficult for you as it assumes PHP knowledge, you'd probably be better getting larry's latest edition of PHP and MySQL http://www.larryullm...de-4th-edition/ and work through that book first.
  3. Right, you're not done yet; all you've done is establish there's an issue with the value you're setting for BASE_URI. Echo the value of $_SERVER['DOCUMENT_ROOT'], insert this value into BASE_URI and change your script back to require(MYSQL). Does the script now work? If not, post the line of the BASE_URI with it's value from the config file.
  4. what happens if you replace the require with the following: require($_SERVER['DOCUMENT_ROOT'] . '\mysql.inc.php');
  5. Post the line of code where you use require( ).
  6. Sitepoint allow you to download a sample of the book, which will give you a good idea of the level and style, usually about 4 chapters. Also, I've always found that if you download the sample, between 24/48 hours later, they send you an email with a discount and link.
  7. I do have thoughts on that, but difficult to explain without a wireframe. I'll do a quick mockup this evening. Would you prefer if I emailed the info or are you happy for the discussion here?
  8. I've used the following book which is excellent: http://www.sitepoint.com/books/wpant1/
  9. The home page is looking so much better now you've removed the social network links and given post titles and intros a bit of white space. From a user point of view I'd personally like to see categories and perhaps tags under the search form input in the right sidebar. On Android, the Amazon flash widget is a real pain: takes up lots of space and doesn't work; I'd prefer not to see it at all on a mobile screen. I should be honest though and mention that I don't like the Amazon widget at all! I'm not keen on the 13px font size for post intros and main text, perhaps I'm just used to the adoption of 16px as the new norm on other blogs. Obviously, it's your design, you have to go with what you like and what works for what you're trying to achieve, but I thought some usability feedback would be useful. Edit: On the forum, would be really handy to have the recent topics at the top of the sidebar, instead of having to scroll down to find it.
  10. http://php.net/manual/en/function.isset.php Marie, you should really learn the basics of PHP before tackling this book. No. The IPN is a listener script, it interacts with paypal directly, there is no interaction between a user (browser) and the script. You should read the tip on page 154 in the book for debugging. If the script is getting to the conditional in your script where the database query is being executed, you should construct the query and dump it to a log file so you can check it is what you're expecting.
  11. Seriously oksana, it's not obvious at all that you're spamming with other accounts too Larisa ;D lol http://www.larryullman.com/forums/index.php?/topic/1614-chapter-11-file-uploads/#entry9868
  12. You generate the thumbnail image once at the point of uploading the original file. So, when a public facing page, like your gallery page, is requested by a user, the page simply makes the call to an image: the thumbnail has already been generated. Please share solutions, it's really helpful to all users and makes the thread more beneficial and a resource in the future. For your prepared statement remove the comma after the final ? parameter marker.
  13. hbphoto, you simply have to iterate over the $_FILES array and then do the normal processing within the loop. Generating the thumbnail server side is definitely easier for the user. We built an application for a professional photographer early this year and what we found was that photographers want complete control over how the thumbnail image looks. Judging from hbphoto's username I'm guessing he/she might be in the same position. For the application we delivered, one original image was uploaded, several predefined sized images were generated, then it took her to a page where she could create the thumbnail using a javascript draggable crop tool with live feedback on the page showing what the thumbnail would look like; which maybe also be an option for you hbphoto?
  14. Yes. Or instead of having to refer to the myfiles[] aray you could name each input: <input name="original" type="file"> <input name="thumb" type="file"> and then refer to each file by the name.
  15. You can't really expect someone to wade through all that code for you, you should just post salient code. Didn't margaux already post a solution to uploading multiple files in your other post http://www.larryullman.com/forums/index.php?/topic/1558-chapter-11-page-316-adding-products/
  16. For personal projects, I wanted to store my repos separately from our work, and github account. I was going to go with github, and was resigned to paying for the 5 private repositories plan (open repos are free and unlimited). However, while searching online I discovered that bitbucket.org now supports Git in addition to Mercurial and they offer unlimited private repos for free; the only catch being you are limited to 5 users on the account. This may be old news to some, but I hadn't really looked around for a while since settling on github. You can't beat free and I hope this is helpful to anyone currently considering.
  17. It really comes down to whether you the think the Unix system is any good, Edward. Asking whether a system is worth it based on image or trend means you're not looking at and comparing the right information based on your requirements. One thing I know for a fact, you've picked a topic that on the internet almost always turns into a flame-war and to which there is never a definitive answer. You can only ever pick what suits your requirements as an individual user; if those requirements are not really limiting you are free to pick the one you feel most comfortable with. From a development point of view, *nix based systems make a lot of sense, especially as most servers are running on a combination of linux and apache. But, this is perfectly possible on a windows system by running a server within a VM.
  18. rob

    Disable Css Tip

    One of the reasons I try to avoid front-end development as much as possible, luckily I work with two very talented front-end devs. Good tip though, Edward.
  19. The error you're seeing is because you don't have a mail sever setup on your local development server. There has been a discussion about a work-around for this: http://www.larryullm...email#entry2055 As it's wamp server specific, you may find better help on their website via their documentation or forums.
  20. The Error message it's telling you exactly how to rectify the issue: http://php.net/manua...settimezone.php I don't have this particular book, but I would be astonished if Larry hadn't mention this setting before the part of the book that uses this script, perhaps you missed it?
  21. Hash the password and echo this out before the SELECT query and manually check this against what is stored in the database. I would have said that since he's getting the script message "Either the email address and password entered do not match those on file or you have not yet activated your account." the db connection is fine but the problem could be the information stored is different to that being used in the SELECT query. I agree though, that checking the character encoding would be a sensible step. edit: i was posting this answer when you posted additional information.
  22. No, Edward. Larry is saying he will be creating the website to sell his book in Yii 1.
  23. checkout_cart.html p277. It's even listed in the index as: shipping, adding to session 277
  24. Paul, check post #2 in this thread, how the code looks will be done automatically, you just have to remember to put the code tags around your code. [ code] [ /code] less space between opening square bracket and code /code.
×
×
  • Create New...