questo è il mio codice:
[php]<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<?php
if (isset($_POST['inserisci'])) {
include '../../config.php';
$link = mysql_connect($host, $user, $password) or die("Non è possibile connettersi al server
");
$conn = mysql_select_db($db, $link) or die("Non è possibile connettersi al db
");
$title = $_POST['title'];
$sectionid = $_POST['sectionid'];
$testo = $_POST['fulltext'];
$insert = "INSERT INTO articoli (title, sectionid, `fulltext`) VALUES ('$title', '$sectionid', '$testo')";
if ($_POST['title'] == NULL || $_POST['sectionid'] == NULL || $_POST['fulltext'] == NULL) {
echo "dati mancanti";
} else {
mysql_query($insert) or die(mysql_error($link));
}
}
?>
<h1>
CKEditor Sample
</h1>
<!-- This <div> holds alert messages to be dis