bluethundr Posted December 11, 2009 Share Posted December 11, 2009 Occasionally I will write code in php that fails to render ANYTHING on the screen. I have error_reporting E_ALL display_errors = 1 Set in my php.ini file and I have removed the mysql error suppression symbol '@' from my code. And yet when I load the page in my browser....nada! Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/184778-turn-off-buffering-in-phpini/ Share on other sites More sharing options...
PFMaBiSmAd Posted December 11, 2009 Share Posted December 11, 2009 It would be - error_reporting = E_ALL Have you checked using a phpinfo() statement if the settings are actually being changed to those values (in case the php.ini that you are changing is not the one that php is using)? Quote Link to comment https://forums.phpfreaks.com/topic/184778-turn-off-buffering-in-phpini/#findComment-975470 Share on other sites More sharing options...
bluethundr Posted December 11, 2009 Author Share Posted December 11, 2009 Thanks, I added the missing equal sign. But for some reason this code is still not rendering. example.8-12.php <?php require 'db.inc'; require_once "HTML/Template/ITX.php"; function formerror(&$template, $message, &$errors) { $errors = true; $template->setCurrentBlock("error"); $template->setVariable("ERROR", $message); $template->parseCurrentBlock("error"); } if (!($connection = mysql_connect("localhost", "thatguy", "yahright?"))) die("Could not connect to database"); $phonebook_id = mysqlclean($_POST, "phonebook_id", 5, $connection); $firstname = mysqlclean($_POST, "firstname", 50, $connection); $surname = mysqlclean($_POST, "surname", 50, $connection); $phone = mysqlclean($_POST, "phone", 20, $connection); $template = new HTML_Template_ITX("./templates"); $template->loadTemplatefile("example.8-10.tpl", true, true); $errors = false; if (empty($firstname)) formerror($template, "The first name field cannot be blank.", $errors); if (empty($surname)) formerror($template, "The surname field cannot be blank.", $errors); if (empty($phone)) formerror($template, "The phone field cannot be blank", $errors); // Now the script has finished the validation, show any errors if ($errors) { $template->show(); exit; } // If we made it here, then the data is valid if (!mysql_select_db("telephone", $connection)) showerror(); // Update the phonebook entry $query = "UPDATE phonebook SET surname = '{$surname}', firstname = '{$firstname}', phone = '{$phone}' WHERE phonebook_id = {$phonebook_id}"; if (!( mysql_query ($query, $connection))) showerror(); // Show the phonebook receipt header("Location: example.8-5.php?status=T&phonebook_id={$phonebook_id}"); ?> Quote Link to comment https://forums.phpfreaks.com/topic/184778-turn-off-buffering-in-phpini/#findComment-975512 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.