I've been trying to find a host that has output_buffering enabled and my host atm doesn't have it enabled. It's impossible to get a hold of him... So... I need to find a solution or get a new host. I thought I might ask before I decide if there was a "right way" or a way that output_buffering doesn't have to be on.
Here's a script I made that fails to function without output_buffering:
<?php
session_start();
if (isset($_SESSION['authenticated'])) {
if (isset($_GET['time']) && isset($_GET['user']) && isset($_GET['pass']) && isset($_GET['ip'])) {
require("config.php");
$currentTime = time();
$time = mysql_real_escape_string($_GET['time']);
$user = mysql_real_escape_string($_GET['user']);
$pass = mysql_real_escape_string($_GET['pass']);
$ip = mysql_real_escape_string($_GET['ip']);
mysql_query("INSERT INTO `deleted` (timeDeleted, timeLogged, username, password, ip) VALUES('$currentTime','$time','$user','$pass','$ip')") or die(/*mysql_error() . */" Error code: 1");
mysql_query("DELETE FROM `flagged` WHERE `timeLogged`='$time'") or die(/*mysql_error() . */"Error code: 2");
mysql_close($con);
include("flagged.php");
}
} else {
header("Location: index.php");
exit;
}
?>
It fails because include("flagged.php"); never gets included, or it might but I just never see it.
So my question is: What can I do to get this to work without output_buffering? And is output_buffering bad/bad practice?