Testing code

16th September, 2009 | Posted by admin |


$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