$query = "INSERT INTO galeria (id, id_boda, imagen) VALUES ('id', 'id_boda', 'namefinal')"; mysql_query($query) or die(mysql_error());