Ciao a tutti, un'altra domanda come mai in IE mi da un'errore quando rileva una string PHP in JS ad esempio

codice:
if(result){  
inputNow.style.background="#32CD32";  
<?php   
$upload = mysql_query("INSERT INTO MailData VALUES(NULL,'".$_SESSION['Nome']."','".$input."')");  
?>  
}else{  
inputNow.style.background="#DC143C";  
}