$stmt = $mysqli->prepare("SELECT id, thetime, towho, fromwho, message, style FROM chat where towho = ? order by id LIMIT " . intval($_POST[o]) . "," . $rowstoget);// . intval($rowstoget));
$stmt->bind_param('s', $to1);
$stmt->execute();
/* bind variables to prepared statement */
$stmt->bind_result($id, $thetime, $towho, $fromwho, $message, $style);
/* fetch values */
while ($stmt->fetch()) {
$badchar = array("\\","'","\r\n","\r","\n");
$replacebadchar = array("\\\\","\\'","
","
","
");
$fromwho = str_replace($badchar,$replacebadchar,$fromwho);
$towho = str_replace($badchar,$replacebadchar,$towho);
$message = str_replace($badchar,$replacebadchar,$message);
$style = str_replace($badchar,$replacebadchar,$style);//"color: \'rgb(0,128,0)\'"; //str_replace($badchar,$replacebadchar,$style);
...
Saturday, January 19, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment