Jump to content
Larry Ullman's Book Forums


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About kamaboko

  • Rank
  1. Hello, I'm editing my previous post. Still much to learn in this chapter, but making my way through it. I was having a difficult time connecting each of the individual pages (e.g., login_page.inc.php, login.php, etc.). Great book though. K
  2. SOLVED. OK...in the book, on page 354, line 35 of the code it is written: if(@mysql_query($query, $dbc)). It should be if(@mysqli_query($dbc, $query)). I made this change after reading more about mysqli_query. Apparently the syntax is mysqli_query(connection,query,resultmode). Thanks for the assistance though. K
  3. Hello Hartley, I tried your suggestion. In fact, I've been messing with this for quite some time now. I've pasted Larry's code, along with how the MySQL database is set up. I'm using PHP 5.5.12 and MySQL 5.6.17. I get the following error: Could not add the entry because: The query being run was: INSERT INTO entries (entry_id, title, entry, date_entered) VALUES (0, 'test title','test text', NOW()) Database: entry_id INT UNSIGNED NOT NULL AUTO_INCREMENT title VARCHAR(100) NOT NULL entry TEXT NOT NULL date_entered DATETIME <!DOCTYPE html PUBLIC "-//W3C//DTD XHTM
  4. Hello, I'm working through exercise 12.5 and had been getting the following errors: To double check, I downloaded the exercise code and got the same error messages. 1.mysql_close() expects parameter 1 to be resource mysql_close($dbc); 2. Warning: mysql_select_db() expects parameter 2 to be resource mysql_select_db('myblog', $dbc); Any suggestions? Thanks, K
  5. Hello, I've coded up the exercises for Chapter 7, in particular, the one regarding "Larry Ullman's Books". When I run it, I get an Array to String conversion error message. I thought maybe I coded something wrong, so I downloaded the code from this site to double check it. I get the same error. Could this be a PHP version problem? I'm using 5.5.12 with Apache version 2.4.9. Thanks, K
  6. Thanks for your replies. I don't know what it is, but chapter 8 is absolutely killing me. I've probably read it ten times, watched a ton YouTube videos on the subject, and the importance of tracking these events still mystifies me. In particular, this code: function reportEvent (e) { 'use strict'; // Get the event object: if (typeof e == 'undefined') e = window.event; // Get the event target: var target = e.target || e.srcElement;
  7. Hello, I'm been slaving over chapter 8 and have a question about obj.addEventListener(). I'm using firebug to walk through the code examples. Does the obj in obj.addEventListener always refer to the engire 'document'? Is there a case where it wouldn't? Thanks for your input K
  8. Thanks. This is on the top of my study list. I thought .value pertained more to things like length or text input, not search. That's why it never occurred to me. Where would you suggest I find more information on how to manipulate the DOM elements? For instance, the point that you pointed out such as --- object.value.search. Thanks, K
  9. Amazing. OK...please take me through this thinking process, because I didn't see that at all.
  10. Thanks for your input. I still can't get this thing to work to save my life. It seems like such a painfully obvious task, but I simply don't get it apparently.
  11. Hi Hartley, Sure...below is my html <!DOCTYPE html> <html lang="en"> <head> <meta charset = "utf-8"> <title></title> <!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js."></script> <![endif]--> </head> <link rel="stylesheet" href="css/calc.css"> <body> <form action="#" method="post" id="stringTest"> <fieldset><legend>String Test</legend> </div><label for="sentence">Sentence</label> <input type="text" name="sen
  12. Hello, I've tried to create a very simple input form to search for a specific word in a string. That said, I'm not having much luck. Firebug is alerting me of an exception error, and I can't figure out why. The code is below. The error msg says it's not a function. function calculate() { 'use strict'; var output; var sentence = document.getElementById('sentence'); var keyword = document.getElementById('keyword'); if(sentence && (sentence.value.length > 0)){ if(sentence.search(keyword) != -1){ //error msg here output = keywo
  13. Hello, Is there a rule I should think of when deciding to use a property vs a method? Thanks, K
  • Create New...