Php 无法在sql数据库中插入

Php 无法在sql数据库中插入,php,mysql,sql,database,sql-insert,Php,Mysql,Sql,Database,Sql Insert,我的问题很简单,但我没有找到解决办法 我可以用safari、opera和chrome插入数据库,但无法在internet explorer和firefox中插入内容 我们将非常感谢您的帮助 if (isset($_SESSION['pseudo']) && isset($_SESSION['pass'])){ // people connected or not if(mysql_result($res,0)==0 ) {// if key doesn't appear in

我的问题很简单,但我没有找到解决办法 我可以用safari、opera和chrome插入数据库,但无法在internet explorer和firefox中插入内容 我们将非常感谢您的帮助

if (isset($_SESSION['pseudo']) && isset($_SESSION['pass'])){ // people connected or not 
if(mysql_result($res,0)==0 ) {// if key doesn't appear in database, show add button
?>

<form method="post" action="">
<input type="image" src="../../images/favoris.png" name="insert" class="insert" value="insert">
</form> 

<?php
}else{ ?>
<form method="post" action="">
<input type="image" src="../../images/delete.png" name="delete" class="delete" value="delete">
</form> 
<?php
} 
}
if (isset($_POST['insert']) ) // if button add is clicked, all informations will be add in database
{
$sql = "INSERT INTO favoris (id, client, profil, photo, prenom, reference, age, lien) VALUES('','$pseudo' ,'$pseudo$referenceBase','$photoBase','$prenomBase', '$referenceBase', '$ageBase','$lienBase')";
mysql_query($sql) or die('Erreur SQL ! '.$sql.'<br>.mysql_error());
echo '<p style= "position: absolute; color: #b9121b; margin-left: 170px; margin-top: 366px"> Profil added!</p>  
<script type="text/javascript"> window.setTimeout("location=(\'\');",1000) </script>';}
else{
'<SCRIPT LANGUAGE="JavaScript">document.location.href="../../index.php"</SCRIPT>';
  }
if(isset($\u SESSION['pseudo'])和&isset($\u SESSION['pass']){//是否有人连接
如果(mysql_result($res,0)==0){//如果数据库中没有出现键,则显示添加按钮
?>

PHP在服务器上运行,浏览器没有什么区别。这里缺少一个'here:
mysql\u query($sql)或die('Erreur sql!'.$sql.'
.mysql\u error());
,只是一个警告。对sql注入开放(
mysql
?).mysql\u query??为什么?我放了“缺失但没有任何变化。Thankshp在服务器上运行,浏览器没有什么区别。你这里有一个缺失:
mysql\u query($sql)或die('Erreur sql!'.$sql)。
.mysql\u error();
,只是一个警告。对sql注入开放(
mysql
?).mysql\u查询??为什么?我放了“丢失但没有变化。谢谢。”