Ho provato a fare come dici ma ho il seguente errore:

syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

Per meglio far capire il tutto posto il mio codice:

<?php require_once('Connections/server.php'); ?>
<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
$controllo = "SELECT * FROM prova WHERE user = $_POST['user'] ";
$verifica = mysql_query ($controllo) or mysql_error();
$sessione = mysql_num_rows ($verifica);
if ($sessione == 1) {
echo " esiste già l'utente"
}else{

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO prova (`user`, nome) VALUES (%s, %s)",
GetSQLValueString($_POST['user'], "text"),
GetSQLValueString($_POST['nome'], "text"));

mysql_select_db($database_server, $server);
$Result1 = mysql_query($insertSQL, $server) or die(mysql_error());
}
?>