Jump to content
Larry Ullman's Book Forums

benjamin.morgan

Members
  • Posts

    38
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by benjamin.morgan

  1. It does help for another set of eyes to look at it, but it also helps to read over it a few times, then take a break, and a couple of days later come back and study it, if you still can't find anything, dissect it and take it one line at a time! Read the logic out loud to make sure that is what you wanted. It has really helped me find errors in the code this way.
  2. Basically it would be written as this. It just takes the discount value and subtracts it from the total and assigns the new value to the total variable. The second one would be the same except with the multiplication operator. total = total - discount;
  3. Not sure but I found this in the code. Not sure if the dollar sign being inside the ' would make the email act up but you never know. $q = "INSERT INTO l30trsb_jobsite (first_name, last_name, email, pass, registration_date) VALUES ('$fn', $'ln', '$e', SHA1('$p'), NOW() )";
  4. I haven't read the book yet, but I think this is the one being used. www.edg3.co.uk/templates/ It's called Plain and Simple.
  5. There is an errata page as well, http://www.larryullman.com/books/modern-javascript-develop-and-design/errata/ . That is one of the errors on there.
  6. I think the hardest part for people losing weight is not just eating healthy, but forgetting to exercise (moderately for around 30 minutes a day). Daily exercise boosts metabolism so the calories burn off faster. I like to run, but I know a lot of people that like riding bikes or using an exercise bike. The problem for me is that I don't like eating healthy! Plus I love coffee.
  7. It's also in the errata. "The name and id values of the comments input need to be lowercase."
  8. Which you can set a preset text before they enter a date as the value of the input. <!-- Will change when they click a date --> Date: <input type="text" id="datepicker" value="Please select a date!">
  9. I like to be safe than sorry, there has been plenty of times when I forgot that little function and couldn't get the script to work.. Even when I tested it it wouldn't work without the ready function. @Christoper, don't forget you can shorten the ready function to this if you like. $(function() { }); Basically the point of the post was to have an input element not a paragraph element.
  10. jQuery (don't forget the document.ready function. <script type= 'text/javascript'> $(document).ready(function() { $('#datepicker').datepicker(); }); </script> HTML Date: <input type="text" id="datepicker" value="Please select a date!">
  11. Mine is to become more advanced with PHP and get back in shape. Hopefully be able to run 2 miles in under 14 minutes. (Gonna take a lot of work for me) What are y'alls New Year Resolutions?
  12. I do hope you mean index.php or the includes won't work. When viewing index.php view the source of the page. Click on the css link in the source. If it doesn't show the css and says something like page not found check the link. Find the stylesheet in the folder and open it in the browser. Compare the two links to check for any errors. Also make sure there are html and head tags, and all tags are closed properly.
  13. That is chapter 14 in the php and mysql for dynamic websites 4th ed. Not sure how in depth it goes though.
  14. I bought the first 2 books, PHP for the Web and PHP and MySQL for Dynamic Websites, and I have looked through both. I have watched a lot of PHP tutorials online that explained the basics, but I had forgotten some of it. I decided to start with the PHP for the Web book because it goes more in depth with the actual PHP code. PHP and MySQL for Dynamic Websites goes over PHP a little, but not nearly as in depth as it is focused on more using PHP with MySQL. If you have the book PHP for the Web I would recommend that you start with that one then move on. That is what I am going to do.
  15. Okay, when you start the phpmyadmin on the server you should create your database, you should have your username and password set. After you import you will probably have to change the database name (most hosts add a random prefix in front of the database name and username and maybe password. Once you create the database, user that accesses it and import the files, then you will have the info for the live site and you can just change it in the mysqli_connect.php file accordingly.
  16. $query="select suburb_id, suburb, state, postcode from tblPostcodes order by suburb,state, postcode asc;"; Not sure if it is because of the semicolon right there, but I don't think it is supposed to be there. I didn't use code tags so I could emphasize the semicolon.
  17. jabsalud It's not nice to hijack posts (posting on someone elses post about a different topic), but I think if you have multiple forms on a page you would have to use the isset function. Just give it a different name attribute.
  18. Not a problem, just one of those "just wondering questions". In 95% of tutorials I have read they use echo even though echo and print do the same thing. Is there a specific reason you chose print or did you just like that word better?
  19. Yeah, In a book you can just go back to it without being recorded . I picked up a local copy of your PHP for the Web book in our local bookstore. Actually I'm very surprised that they had it (in the 4th edition and in an okay condition) I believe the 4th edition is the latest, which is the one I picked up.
  20. I loved the video Larry, I like how you explain things in the video as well as you do in the book!
  21. Thanks, Yeah, it was jsFIddle causing one of the problems, but the line I needed was document.getElementById('move').style.left = '10px';
  22. http://codepen.io/benjaminmorgan/pen/drtCx Yay! I got everything working right! I also found out that if you nest intervals do NOT name them the same thing even if the interval gets cleared. It caused a weird bug!
×
×
  • Create New...