Sep 16, 09   Posted by admin

Testing code


$title = $_POST['title'];
$content = $_POST['content'];
if(!get_magic_quotes_gpc())
{
$title = addslashes($title);
$content = addslashes($content);
}
include 'library/config.php';
include 'library/opendb.php';
$query = " INSERT INTO news (title, content) ".
" VALUES ('$title', '$content')";
mysql_query($query) or die('Error ,query failed');
include 'library/closedb.php';
echo "Article '$title' added";
}

Leave a Reply

Recent Comments

Free MMORPGs Open Source CMS First class realtors