Assignment 8:
http://onepotcooking.com/keiyanwat/class8/index.php
Here are some of the problems encountered:
1. Getting a comment to show up underneath the post it is submitted for.
-Apparently, you have to the div layer the id number of the post for the comment script have to refer to like:
<_div_id="<_?_=_$post_['id'];_?_>"
Then call the function with the id number as the parameter:
function_getAllComments(_$blogPostId_)_{
$myQuery_=_"SELECT_* FROM_tablename_WHERE_blogpost_id={_$blogPostId_} ORDER BY created desc"; [etc etc]
I don't really get how the div can reference the place where the function is called and executed, but it does.
2. Entering data into the database.
-I made a lot of errors here referring to the correct field name from the form and inserting it into a variable then use it in the mySQL command line. These kinds of mistakes are really hard to check, but the browser helps somewhat by telling you what line to check.
3. Using an array to get the list of username and password and getting it to check the login.
-I'm still not too clear on how to use an array, so I had to look at another assignment. But parts assignment 7 was definitely usual here.
Thursday, December 11, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment