Forum Moderators: coopster
$linkID = mysql_connect($host,$user,$pass) or die ("Could not connect to host.");
mysql_select_db($database,$linkID) or die ("Could not find database.");
$query = "SELECT * from shoutbox ORDER BY id DESC";
$resultID = mysql_query($query,$linkID) or die ("Data not found");
$xml_output = "<?xml version =\"1.0\"?>\n";
$xml_output = "<shouts>\n";
for ($x = 0; $x < mysql_num_rows($resultID); $x++){
$row = mysql_fetch_assoc($resultID);
$xml_output .= "\t<shout>\n";
$xml_output .= "\t\t<name>" . $row['name'] . "</name>\n";
$xml_output .= "\t\t<time>" . $row['time'] . "</time>\n";
$xml_output .= "\t\t<site>" . $row['site'] . "</site>\n";
$xml_output .= "\t\t<message>" . $row['message'] . "</message>\n";
$xml_output .= "\t</shout>\n";
}
$xml_output.= "</shouts>";
echo $xml_output;
?>
not to mention I have tried to use the following code That DIDNT help:
$date_time1 = strtotime("yyyy-mm-dd hh:ii:ss"); // returns bad value -1 due to DST
$date_time2 = strtotime("yyyy-mm-dd hh:ii:ss EST"); // works great!