Il mio problema può essere "ridicolo", ma penso che mysql sia un "bambino" capriccioso!
Codice PHP:
$titolo=$_POST['titolo'];
$contenuto=$_POST['contenuto'];
$posizione=$_POST['posizione'];
$totale="<h2>$titolo</h2><iframe width='400px' height='250px' src='http://www.youtube.com/embed/".$contenuto."' frameborder='0' allowfullscreen></iframe>";
mysql_query("INSERT INTO contenuti (contenuto , posizione) VALUES('$totale' , '$posizione')") or die(mysql_error());
Cosa c'è di sbagliato in questo banale script? NOn credo sia sbagliato mysql dice di si, mi dà errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '400px' height='250px' src='http://www.youtube.com/embed/Inserisci contenuto' fra' at line 1