S@lut @ vous !!!!!
voila je vous esplique mon pb !
j'ai un formulaire avec plusieur boutons, quatres pour etre precis ( ajouter, supprimer, rechercher, modifier)
je crois que mon bouton ne revoie pas vers le script php
voici mon code : ( partiel !)
<form method="POST">
<td valign="top">Numéro client :</td>
<td valign="top">
<p align="center"><input type="text" name="Numclient" size="20"></td>
<td valign="top"> Code =postal :</td>
<td valign="top" height="26">
<p align="center"><input type="text" name="Codepostal" size="20"></td>
<input type="submit" value="ajouter" onclick="location='ajout.php?action=ajouter';" name="ajouter">
<input type="submit" value="modifier" onclick="location='modif.php?action=modifier';" name="modifier">
<input type="submit" value="rechercher" onclick="location='rech.php?action=rechercher';" name="rechercher">
<input type="button" value="supprimer" onclick="location='sup.php?action=supprimer';" name="supprimer"></p>
et voici le code de mon script PHP d'insertion dans la base ("j'utilise easy php"):
<html> <body>
<?php
$Numclient=$_POST['num_client']
$Societe=$_POST['societe']
$Contact=$_POST['contact']
$Adresse=$_POST['adresse']
$Codepostal=$_POST['cpt']
$Ville=$_POST['ville']
$Telclient=$_POST['num_tel']
$Faxclient =$_POST['num_fax']
$id_connex = mysql_connect ("localhost", "root", "") or
die ("connexion impossible");mysql_select_db("gestion_clients",$id_connex)
$requete= 'INSERT INTO `client` ( `num_client` , `societe` , `contact` , `adresse` , `cp` , `ville` , `num_tel` , `num_fax` ) '
. ' VALUES ('$Numclient, $Societe, $Contact, $Adresse, $Codepostal, $Ville, $Telclient, $num_fax );'
. ' ';
mysql_query($requete);
mysql_query($requete);
echo "Le client a bien été enregistrer !";
mysql_close($id_connex);
?>
</body>
</html>
merci de m'aider, c une Aplication pour mon BTS Blanc
Frederic
vive PHP !!!, vive la prog !!!