Posté : 06-01-2007 18:59
salut j'arrive peut etre pas a voir le prob car ca fait un moment que je cherche enfin bon !!
voic mon code
function renome($titre) {
$string = strtolower($titre);
$modif = ereg_replace(' ', "_", $string);
$carac_speciaux =array("à", "À", "é", "è", "È", "ë", "Ë", "ê", "Ê", "ï", "Ï", "î", "Î", "ù", "Ù", "-", "ç", "°");
$carac_rempl =array("a", "A", "e", "e", "E", "e", "E", "e", "E", "i", "I", "i", "I", "u", "U", "_", "c", "");
$modif =str_replace($carac_speciaux, $carac_rempl, $modif);
return $modif;
}
$nom = $_POST["nomvoiture"];
$nomvoituremodifier = renome($nom);
et apres o moment de l'insertion dans la bdd
$strSQL1 = "INSERT INTO `voiture` ( `id` , `Constructeur` , `modele` , `prix` , `type` , `portes` , `carburant` , `couleur` , `production` , `circulation` , `kilometrage` , `cylindre` , `puissance` , `puissance_fiscal` , `boite` , `place` , `volant` , `autre` , `vendre` , `vendu` ) VALUES (NULL, '".$_POST["constructeur"]."', '".$_POST["modele"]."', '".$_POST["prix"]."', '".$_POST["type"]."', '".$_POST["porte"]."', '".$_POST["carbu"]."', '".$_POST["couleur"]."', '".$_POST["prod"]."', '".$_POST["circu"]."', '".$_POST["kilo"]."', '".$_POST["cylindre"]."', '".$_POST["puissance"]."', '".$_POST["pf"]."', '".$_POST["boite"]."', '".$_POST["place"]."', '".$_POST["volant"]."', '".$_POST["autre"]."', '".$_POST["oki"]."', '0');";
$resultat1 = requete_SQL($strSQL1);
$ancienid = mysql_insert_id();
$strSQL = "INSERT INTO `pages` ( `Id_page` , `Titre` , `TitreUrl` , `Mots_cles` , `Description` , `Contenu` , `Id_parent` , `Id_Enfant` , `Compteur` ) VALUES (NULL, '".$_POST["nomvoiture."].", '".$nomvoituremodifier."', '".$_POST["metamot"]."', '".$_POST["description"]."', '".$direction."/voiture.inc', '".$_POST["modele"]."', '".$ancienid."', '0');";
$resultat = requete_SQL($strSQL);
les premiere requete fonctionne il y'a juste o moment ou
$resultat = requete_SQL($strSQL);
que ca merde et j'ai une erreur
Erreur SQL : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'citroen_ds_23_ie_pallas', '', '', 'pages/citroen_ds_23_ie_pallas/voiture.inc', '' at line 1
SQL string : INSERT INTO `pages` VALUES (NULL, ', 'citroen_ds_23_ie_pallas', '', '', 'pages/citroen_ds_23_ie_pallas/voiture.inc', 'DS 23 IE', '7', '0');
Merci d'envoyer ce message au webmaster
merci de votre aide ++ |