Answer the question
In order to leave comments, you need to log in
Why is the database query not working?
There is a request
$NameVideo = $_POST ['name'];
$idVideo = $_POST ['message'];
echo $NameVideo;
$db = mysql_connect("localhost","d9",774272722");
mysql_select_db("dlx",$db);
mysql_query("SET NAMES utf8");
$resultat = mysql_query("INSERT INTO `dlx`.`videoByMe` (`id`, `DenumireaVideo`, `VideoMixID`) VALUES (NULL, \'.$NameVideo.\', \'.$idVideo.\');");
mysql_close($db);
Answer the question
In order to leave comments, you need to log in
$NameVideo = $_POST ['name'];
$idVideo = $_POST ['message'];
echo $NameVideo;
$db = mysql_connect("localhost","d9",774272722");
mysql_select_db("dlx",$db);
mysql_query("SET NAMES utf8");
$resultat = mysql_query("INSERT INTO `dlx`.`videoByMe` (`id`, `DenumireaVideo`, `VideoMixID`) VALUES (NULL, '$NameVideo', '$idVideo')"); // тут был бардак с кавычками
if(!$resultat){
var_dump(mysql_error()); // тут скорее всего ругнётся, что id не может быть NULL
exit();
}
mysql_close($db);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question