im tryting to look where did do wrong but i cant find the problem, i cant update my database, can someone see my code whats missing? Is always saying me “database error”
Code:
<?php
if(isset($_POST['enviar'])) {
$types="";
for ($i=0; $i<count($_POST['texames']);$i++)
$types=$types.$_POST['texames'][$i].',';
$meta_desc=$_POST['meta_desc'];
$meta_info=$_POST['meta_info'];
$id_meta=$_POST['id_meta'];
if($meta_desc && $meta_info) {
$sql="update metainfo set meta_desc, meta_info='$meta_desc', '$meta_info' where id_meta=$id_meta";
mysql_query($sql) or die("DAtabase Error ...");
header("Location: list.php");
} else {
echo '<script language="javascript">alert("Fill Form!");</script>';
}
}
?>
You are setting two columns simultaneously;
Change your query to: