Bnjour
J'ai un formulaire dont j'ai passé un id dans l'action:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<form method="POST" name="Form" class="Forsm" id="test"  action="tache.php?id_ch={$smarty.get.id_ch}">
 
					<fieldset id="fl1" class="fl1" style=" width: 90%">
						<legend>Ajouter</legend>
						<input type="hidden" name="ajout" />
 
						<dt>
							<label for="nom_tache" style="font-size: 15px;">Nom tache</label>
						</dt>
						<dd><input type="text" id="nom_tache" class="nom_tache required" name="nom_tache" /></dd>
					</dl>
 
					<dl>
						<dt>
							<label for="prix_tache" style="font-size: 15px;">Prix</label>
						</dt>
						<dd><input type="text" id="prix_tache" class="prix_tache required  number" name="prix_tache" /></dd>
					</dl>
 
 
 
					<div id="submit_buttons">
						<button type="reset" style="font-size: 10px;">Effacer</button>
						<button type="submit" style="font-size: 10px;">Valider</button>
					</div>
 
				</fieldset>
 
			</form>
et la requete d'ajout et comme cela :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
mysql_query (" INSERT INTO btp_taches_chantier(id_tache,id_ch,nom_tache,prix_tache)  VALUES('','$nom_tache','$prix_tache') where id_ch=$id_ch");
Mais l'ajout ca marche pas