Anyone here familiar with PHP?

http://qwertyman.pastebin.com/96uAJyLx

The desired output is:

(index.php)

Page to go to: [_____________]

Submit a thought
Leave a comment

Entries from newest to oldest

(All the entries would go here.)


However, no entries put in in think.php are recorded here.

(entry.php)

(It would be entry.php?pgnum=<some number>)
(Page title is whatever $title is)
(Blah bee blah bee blah, whatever $entry is)


However, on the highlighted lines (7 and 8 of entry.php), I get an error saying that one of the parameters is not a valid MySQL result resource.

And for think.php, it doesn't seem to be writing to the database.
There is some sort of error in your query. You can test for a valid result several different ways...

1
2
if(!$result = mysql_query(...))
      echo mysql_error();


Will provide more details as to why the query failed.
Couldn't you do mysql_query(...) || die(mysql_error());?
Edit: Or would it be mysql_query(...) or die(mysql_error());? I can't remember.
Last edited on
I don't like using die() cause it doesn't let you clean up the html page. Basically aborts script execution at the point it's called.
Topic archived. No new replies allowed.