Bonjour,
j'ai un problème avec une fatal error Virtual
fatal error: call to undefinited function virtual() ...................; on line 1
Je suis debutant, il s'agit d'un formulaire d'inscription. que dois je faire ??
ci dessous le script, merci d'avance
<?php virtual('/Connections/webtransit.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($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']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form4")) {
$insertSQL = sprintf("INSERT INTO inscription (societe, siret, contact, tel, fax, email, souhait, moyen, type, commentaire) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['societe'], "text"),
GetSQLValueString($_POST['siret'], "int"),
GetSQLValueString($_POST['contact'], "text"),
GetSQLValueString($_POST['Tel'], "int"),
GetSQLValueString($_POST['fax'], "int"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['souhait'], "text"),
GetSQLValueString($_POST['moyen'], "text"),
GetSQLValueString($_POST['type'], "text"),
GetSQLValueString($_POST['Commentaire'], "text"));
mysql_select_db($database_webtransit, $webtransit);
$Result1 = mysql_query($insertSQL, $webtransit) or die(mysql_error());
$insertGoTo = "/Site/merci.html";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
