Aug. 25th, 2006
PHP and MySQL trouble.
Aug. 25th, 2006 10:38 amSo, I have this PHP code, talking to an SQL database.
The first part creates a text box with a button. When you put something in the box and click the button, it inserts it into an SQL database. The second half, after the form, reads all entries in that SQL database and displays them.
The second part works perfectly.
The first part fails with absolutely no errors - it just never adds anything to the table.
This example is RIGHT out of the book, literally.
Any PHP geeks out there who can tell me what the hell I'm doing wrong?
And yes, I've munged the brackets. Setting those back to angles is trivial. Making Livejournal obey a PRE tag is not trivial.
( Code )
EDIT: I've found the problem, I think. $PHP_SELF is not working. Now I just need to fix it...
EDIT THE SEQUEL: Fixed that, but still can't submit data. At least I'm getting an error, now.
EDIT PART THREE: ELECTRIC BOOGALOO: Fixed. The problem is that modern PHP can't just read comments submitted through the form by default, and you need to use $_REQUEST("comment") to grab the data that's fed into the form from a form named "comment"
The first part creates a text box with a button. When you put something in the box and click the button, it inserts it into an SQL database. The second half, after the form, reads all entries in that SQL database and displays them.
The second part works perfectly.
The first part fails with absolutely no errors - it just never adds anything to the table.
This example is RIGHT out of the book, literally.
Any PHP geeks out there who can tell me what the hell I'm doing wrong?
And yes, I've munged the brackets. Setting those back to angles is trivial. Making Livejournal obey a PRE tag is not trivial.
( Code )
EDIT: I've found the problem, I think. $PHP_SELF is not working. Now I just need to fix it...
EDIT THE SEQUEL: Fixed that, but still can't submit data. At least I'm getting an error, now.
EDIT PART THREE: ELECTRIC BOOGALOO: Fixed. The problem is that modern PHP can't just read comments submitted through the form by default, and you need to use $_REQUEST("comment") to grab the data that's fed into the form from a form named "comment"
(no subject)
Aug. 25th, 2006 03:37 pmMississippi Baptist church votes to exclude all blacks in response to a 10-year-old boy trying to join.
UPDATE: A new version of the story includes comments from the other church members, who claim that no such vote took place and that the pastor is just trying to harm the church by claiming that there was a vote.
UPDATE: A new version of the story includes comments from the other church members, who claim that no such vote took place and that the pastor is just trying to harm the church by claiming that there was a vote.