PDA

View Full Version : I created a wysiwyg editor but I dont arrive to save the posts in the database



magictouch
06-11-2016, 05:06 PM
Hi, how I can put in the database things posted on my wysiwyg editor? I tryed many ways with what I know of php but it does not work.
I created this code: (I don't have enough knoledge for all this)

<?php

if(isset($_POST['submit']))
{
if(!empty($_POST['titulo'])&&!empty($_POST['mensagem']))

{
$titulo=$_POST['titulo'];
$mensagem=$_POST['mensagem'];
$id=$_POST['id'];


$query=mysql_query("INSERT INTO db(id,titulo, mensagem,password, myfile) VALUES // here I try to insert in the db, but Nothing!!!
('$id','$titulo','$mensagem','$password', '$name')");

}

} else echo "Vous devez saisir tout les champs pour pouvoir poster un commentaire";

?>