Bonjour !

J'ai un petit souçis avec un truc qu'est pas censé etre compliqué à la base ... mais bon la ca me prend la tête de pas trouver, alors je vous demande votre aide (ou vos yeux ...).

Mon code est assez long, le mieux serait de faire un petit copier/coller dans un éditeur ... enfin j'ai aps de conseils a vous donner

Le problème: J'ai un formulaire, mais quand je le "submit", il ne rentre pas dans la boucle en tête de script (celle qui teste si !empty($_POST) ). D'ailleur, un petit print_r($_POST) en début m'affiche bien un tableau vide ... Vous voyez quelque chose ? (PS: tout est dans le meme script, dans "/util/index.php")

Voici le code, j'ai laissé que ce qui pose problème:
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
 
<?
if(!empty($_POST))
{	require_once("../../constantes.php");
	require_once("../../fonctions.php");
	session_start();
 
	if(!isset($_SESSION['admin']))
	{	quit("Acces non autorisé");}
	$liendb = connect_bdd();
 
	if(isset($_POST['action']))
	{
	}
	else
	{	if(!empty($_POST['mdp1'])&&($_POST['mdp1']==$_POST['mdp2']))
		{	$id = crea_compte($_POST) or quit("Impossible de creer le compte");
			header('Location: ./index.php');
		}
		else
		{	quit("Les deux champs mots de passe de correspondent pas !");}
	}
 
	die();
}
case "newuser":
		{	?>
			<form action="./util/index.php" method="post">
				<table>
					<tr>
						<th colspan="2">Les champs avec * sont obligatoires</th>
					</tr>
					<tr>
						<th>Identifiant</th>
						<td><input type="text" name="id" maxlength="20"/></td>
					</tr>
					<tr>
						<th>Civilité*</th>
						<td>	<input type="radio" name="civilite" value="M"/ checked="checked"> Monsieur <br/>
								<input type="radio" name="civilite" value="F"/> Madame <br/>
								<input type="radio" name="civilite" value="L"/> Mademoiselle
						</td>
					</tr>
					<tr>
						<th>Nom*</th>
						<td><input type="text" name="nom" maxlength="30"/></td>
					</tr>
					<tr>
						<th>Prenom*</th>
						<td><input type="text" name="prenom" maxlength="30"/></td>
					</tr>
					<tr>
						<th>Mot de Passe*</th>
						<td><input type="password" name="mdp1"/></td>
					</tr>
					<tr>
						<th>Retaper le mot de passe*</th>
						<td><input type="password" name="mdp2"/></td>
					</tr>
					<tr>
						<th>Tel Interne</th>
						<td><input type="text" name="tel_int" maxlength="4" size="4"/></td>
					</tr>
					<tr>
						<th>Tel ligne directe</th>
						<td><input type="text" name="tel_dir" maxlength="10" size="10"/></td>
					</tr>
					<tr>
						<th>Tel portable</th>
						<td><input type="text" name="tel_por" maxlength="10" size="10"/></td>
					</tr>
					<tr>
						<th>Adresse Mail</th>
						<td><input type="text" name="mail" maxlength="50"/></td>
					</tr>
					<tr>
						<th>Acces a l'informatique</th>
						<td>
							<input type="radio" name="acces_info" value="N" checked="checked"/> Non &nbsp
							<input type="radio" name="acces_info" value="O"/> Oui
						</td>
					</tr>
					<tr>
						<th>Localisation</th>
						<td><input type="text" name="localisation" maxlength="30"/></td>
					</tr>
					<tr>
						<th>Service</th>
						<td>
							<select name="service">
								<option value="0">Inconnu</option>
						<?
				$temp = mysql_query("SELECT * FROM service ORDER BY designation_service");
				while($result = mysql_fetch_assoc($temp))
				{	echo '<option value="'.$result['id_service'].'">'.$result['designation_service'].'</option>';}
						?>
							</select>
						</td>
					</tr>
					<tr>
						<th>Fonction</th>
						<td><input type="text" name="fonction" maxlength="30"/></td>
					</tr>
					<tr>
						<th>3ème jour de repos</th>
						<td>
							<input type="radio" name="jour_repos" value="0" checked="checked"/> Inconnu <br/>
							<input type="radio" name="jour_repos" value="1"/> Lundi <br/>
							<input type="radio" name="jour_repos" value="2"/> Mardi <br/>
							<input type="radio" name="jour_repos" value="3"/> Mercredi <br/>
							<input type="radio" name="jour_repos" value="4"/> Jeudi <br/>
							<input type="radio" name="jour_repos" value="5"/> Vendredi <br/>
						</td>
					</tr>
					<tr>
						<th colspan="2"><input type="submit" value="Creer le compte"/></th>
					</tr>
				</table>
			</form>
Merci a vous