well, this line: 'img/upcomingcds.gif','img/upcomingcds2.gif')">
is a line found inside the html file. Now i know it reads it, but i don't want it to be executed, just inserted into the mysql database.
i'm not sure why this would cause an error.
below is my code.
<?php
// Punchkids.com News Editor
include 'error.inc';
include 'db.inc';
// get contents of news html file into a string
$filename = "news.html";
$handle = fopen($filename, "r");
$news_html = fread($handle, filesize($filename));
fclose ($handle);
// Build Query
$query = "UPDATE news SET content = '$news_html' where keyId = 1";
// Open a connection to the database
if (!($connection = @ mysql_connect($hostName, $username, $password)))
showerror();
if (!mysql_select_db($databaseName, $connection))
showerror();
// Insert HTML source for news
if (!($result = @ mysql_query ($query, $connection)))
showerror();
// Make sure mysql connaction is closed
if (!mysql_close($connection))
showerror();
// direct them to the next page
header("Location: news.php");
?>
all this script is supose to do it take the contents of a html file, insert it into a mysql database, then forward the user to the news page.