0
Pour une raison quelconque, je ne peux pas poster un texte plus long d'environ 40 ~ caractères ..insert Sql insérer wont texte plus de 40 caractères
Le code
// remove space
foreach($_POST as $key => $val) $_POST[$key] = trim($val);
// check for empty fields
if (empty($_POST['comment'])) {
header("Refresh: 2; url=$_SERVER[REQUEST_URI]");
exit('<div class="error_msg">You can\'t post a blank message.</div>');
}
// save if no problem
else {
mysql_query("INSERT INTO comments (comment, content, content_id, poster, date)
VALUES('{$_POST['comment']}', 'thread', '$thread_id', '1', NOW())");
header("refresh: 2; url=thread.php?id=$thread_id");
// SUCCESS
}
Db:
`id` int(11) NOT NULL AUTO_INCREMENT,
`comment` text,
`content` varchar(255) NOT NULL,
`content_id` int(11) NOT NULL DEFAULT '0',
`poster` int(11) NOT NULL DEFAULT '0',
`date` datetime NOT NULL
tout des idées?
et oui je désinfecte va les $ _POST
merci Tomasz