I have a PHP script with much repeated code that works fine - but not until I reach this function:
After the line marked "right here", the scripts stops running altogether. No error message is displayed. Any output (I put print and echo statements after it) does not get displayed after that line, nor does any function execute. There is no error in my server logs. I have that kind of Database setup throughout my script, and only on that function does it fail. Any ideas on whether it is a PHP bug or some wrongdoing on my part and if so how I can correct it? I am running PHP5 on Windows, but it will be ported to a Linux system later.
Code:
function deleteCommentAction() {
$db = new Database;
$con = $db->db_connect('removal'); //right here
mysql_select_db("theatheistconservative", $con);
$query = "DELETE FROM blog_comments WHERE id='{$_GET["commentid"]}'";
mysql_query($query, $con)|| die("Query error: ".mysql_error($con));
$pages = new UIPages;
$pages->checkCommentsPage("The comment has been deleted.");
}
After the line marked "right here", the scripts stops running altogether. No error message is displayed. Any output (I put print and echo statements after it) does not get displayed after that line, nor does any function execute. There is no error in my server logs. I have that kind of Database setup throughout my script, and only on that function does it fail. Any ideas on whether it is a PHP bug or some wrongdoing on my part and if so how I can correct it? I am running PHP5 on Windows, but it will be ported to a Linux system later.