$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”; }
Recent Comments