why $message cannot to be inserted to mysql? see inside
| From: | Bo | Date: | Mon, 21 Apr 2003 20:57:20 +0000 |
| Subject: | why $message cannot to be inserted to mysql? see inside | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27224@lists.php.net to get a copy of this message | ||
how to get "specific" contents of a webpage?
££££££££
$filename="http://blahblah/index.php";
...........
ob_start();
$message = @readfile($filename);
if (false !== $message) { // no readfile error
$message = ob_get_contents();
}
ob_end_clean();
if I echo $message, there is no problem for it show on the screen, however,
it won't get inserted into database which is frustrating me a lot(if change
$message="ok", it can be inserted perfectly fine):
$insertQuery = "insert into posts values ( \"{$fid}\",
\"{$tid}\",
\"{$pid}\",
\"{$author}\",
\"{$message}\",
\"{$subject}\"
)";
@mysql_query ($insertquery, $conn);
based on this, even if I could insert $message later on, how do I
differentiate the contents from images, such as I only want to insert text
info of $message and despite all the images.
thank you, I'm getting frustrated.
Bo