par
pat » 08 févr. 2009, 01:18
Bonjour,
Mon script pour insérer des donnés dans la base de donnée suite à un formulaire ne fonctionne plus depuis que je suis sur php5.2 et window vista
Je me demande où est le problème.
Merci
$editFormAction = $_SERVER ['PHP_SELF'];
if (isset($_SERVER ['QUERY_STRING'])) {
$editFormAction .= "?" . $_SERVER ['QUERY_STRING'];
}
if ((isset($_SERVER ["MM_insert"])) && ($_SERVER ["MM_insert"] == "form10")) {
$insertSQL = sprintf("INSERT INTO t_investissement (genre, nom, prenom, fonction, adresse, cp,
ville, pays, tel, fax, mail, investissement, materiel, article, ref_article, caracteristique, fournisseur_contacte, societe, `date`)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['genre'], "text"),
GetSQLValueString($_POST['nom'], "text"),
GetSQLValueString($_POST['prenom'], "text"),
GetSQLValueString($_POST['fonction'], "text"),
GetSQLValueString($_POST['adresse'], "text"),
GetSQLValueString($_POST['cp'], "text"),
GetSQLValueString($_POST['ville'], "text"),
GetSQLValueString($_POST['pays'], "text"),
GetSQLValueString($_POST['tel'], "text"),
GetSQLValueString($_POST['fax'], "text"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['investissement'], "text"),
GetSQLValueString($_POST['produit'], "int"),
GetSQLValueString($_POST['article'], "int"),
GetSQLValueString($_POST['refarticle'], "text"),
GetSQLValueString($_POST['demande'], "text"),
GetSQLValueString($_POST['fournisseur'], "int"),
GetSQLValueString($_POST['societe'], "text"),
GetSQLValueString($_POST['date'], "date"));
mysql_select_db($database_connectgl, $connectgl);
$Result1 = mysql_query($insertSQL, $connectgl) or die(mysql_error());
Bonjour,
Mon script pour insérer des donnés dans la base de donnée suite à un formulaire ne fonctionne plus depuis que je suis sur php5.2 et window vista
Je me demande où est le problème.
Merci
[php]
$editFormAction = $_SERVER ['PHP_SELF'];
if (isset($_SERVER ['QUERY_STRING'])) {
$editFormAction .= "?" . $_SERVER ['QUERY_STRING'];
}
if ((isset($_SERVER ["MM_insert"])) && ($_SERVER ["MM_insert"] == "form10")) {
$insertSQL = sprintf("INSERT INTO t_investissement (genre, nom, prenom, fonction, adresse, cp,
ville, pays, tel, fax, mail, investissement, materiel, article, ref_article, caracteristique, fournisseur_contacte, societe, `date`)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['genre'], "text"),
GetSQLValueString($_POST['nom'], "text"),
GetSQLValueString($_POST['prenom'], "text"),
GetSQLValueString($_POST['fonction'], "text"),
GetSQLValueString($_POST['adresse'], "text"),
GetSQLValueString($_POST['cp'], "text"),
GetSQLValueString($_POST['ville'], "text"),
GetSQLValueString($_POST['pays'], "text"),
GetSQLValueString($_POST['tel'], "text"),
GetSQLValueString($_POST['fax'], "text"),
GetSQLValueString($_POST['Email'], "text"),
GetSQLValueString($_POST['investissement'], "text"),
GetSQLValueString($_POST['produit'], "int"),
GetSQLValueString($_POST['article'], "int"),
GetSQLValueString($_POST['refarticle'], "text"),
GetSQLValueString($_POST['demande'], "text"),
GetSQLValueString($_POST['fournisseur'], "int"),
GetSQLValueString($_POST['societe'], "text"),
GetSQLValueString($_POST['date'], "date"));
mysql_select_db($database_connectgl, $connectgl);
$Result1 = mysql_query($insertSQL, $connectgl) or die(mysql_error());
[/php]