webguync Posted April 20, 2010 Share Posted April 20, 2010 anyone know why this code would just display as a blank white page? It should at least give me an error, I would hope. <?php ini_set("display_errors","1"); error_reporting(E_ALL); session_start(); $con = mysql_connect("localhost","uname","pw") or die('Could not connect: ' . mysql_error()); mysql_select_db("DBName") or die(mysql_error()); $_SESSION['user_id'] = $user_id; //DELETE QUERY TO SELECT RECORD TO DELETE BASED ON LOGIN INFO. $query_delete = "DELETE FROM Caris_log_April2010 WHERE user_id = $user_id AND Caris_roster_March2010.user_id = $user_id"; echo $query; //for debugging test $result_delete = mysql_query($query_delete) or trigger_error('Query failed: ' .mysql_error()); if ($result_delete) { echo "Delete Successful" }// end if else { echo "Failed" } //end else ?> Quote Link to comment https://forums.phpfreaks.com/topic/199165-code-not-working-no-errors-as-to-why/ Share on other sites More sharing options...
NTSmarkv Posted April 20, 2010 Share Posted April 20, 2010 perhaps maybe your connection info?? I see a few things wrong with it Quote Link to comment https://forums.phpfreaks.com/topic/199165-code-not-working-no-errors-as-to-why/#findComment-1045323 Share on other sites More sharing options...
PFMaBiSmAd Posted April 20, 2010 Share Posted April 20, 2010 Your code contains a fatal parse error - Parse error: syntax error, unexpected '}', expecting ',' or ';' in your_file.php on line 15 Please develop and debug php code on a system where error_reporting is set to E_ALL and display_errors is set to ON in your master php.ini so that php will report and display all the errors it detects. Putting the two lines of code in your code that sets the error_reporting/display_errors settings won't show fatal parse errors because you code is never executed to cause those two settings to take effect. The cases where you have seen it suggested to put those two lines of code in your code for debugging purposes were when code appeared to be executing but not producing expected results. Quote Link to comment https://forums.phpfreaks.com/topic/199165-code-not-working-no-errors-as-to-why/#findComment-1045328 Share on other sites More sharing options...
webguync Posted April 20, 2010 Author Share Posted April 20, 2010 ok, I see the errors now, thanks. Quote Link to comment https://forums.phpfreaks.com/topic/199165-code-not-working-no-errors-as-to-why/#findComment-1045337 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.