0
I have this piece of code in PHP. When sending to the database data images are separated by ;
and the videos only put ;
in the last video .
foreach($html->find('img') as $imagensdescricao) {
$imagens1 .= $imagensdescricao->src;
$imagens1 = mysql_real_escape_string($imagens1.";");
}
foreach($html->find('iframe') as $videodescricao)
$videos1 .= $videodescricao->src;
$videos1 = mysql_real_escape_string($videos1.";");
That’s how I’m sending:
$sqlinsert="INSERT INTO eventos ( Titulo , Preco, Imagens , Datainicio , Datafim , Descricao , Local , Hora , Videos , Imagem) VALUES ( '$Titulo' ,'$preco' , '$imagens1' , '$datainicio' , '$datafim' , '$resumo' , '$local' , '$horario' , '$videos1' ,'$imagem')";
This is no mistake with the database the error is that if, for, foreach without
{}
only allow a line and the tag phpmyadmin has no connection with the problem, phpmyadmin is a software for managing banks, it has no link with mysql or its code– Guilherme Nascimento