Bonjour
Ma première page index.php s'affiche correctement en local sous easyphp. Mais lorsque je clique sur un lien en bas de ma page (qui doit permettre d'acceder au formulaire de création de compte), j'ai une erreur "serveur introuvable, Impossible d'afficher la page" sous IE.
J'ai réussi à isoler l'erreur, et il semble que cela soit du à ce fameux formulaire, qui au début était appellé par une fonction, et maintenant par un include. Mais rien n'y fait. L'include plante au même titre que la fonction.
Voici le code:
index.php
Et voici le formulaire, formutil.php (il plantait aussi à son appel en fonction, dans fonctions.php):
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 <?php require_once('constantes.php'); require_once('fonctions.php'); session_start(); $msg=''; if(!empty($_POST)) { } elseif(isset($_GET['action'])) { if($_GET['action']=='creercompte') { if(ACCES_CREA_COMPTE==0) { die("");} echo '<html> <head> <title>Portail Intranet de l\'OPAC de l\'Yonne</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body>'; echo '<div id="account"> <img src="img/logo1.jpg"/> <form method="post" action="index.php" enctype="multipart/form-data">'; include('includes/formutil.php'); echo ' <input type="hidden" name="action" value="creercompte"/> </form> </div>'; echo '</body></html>'; } } else { ?> <html> <head> <title>Portail Intranet de l'OPAC de l'Yonne</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="login"> <hr/> <h1> <img src="img/logo2.jpg"/> </h1> <hr/> <?php //Alertes + Alerte créa util if(!empty($_GET)&&isset($_GET['id_util'])) { $msg.="<li>Votre compte utilisateur a bien été créé. Votre identifiant est <b>".$_GET['id_util']."</b>, NE LE PERDEZ PAS !!!</li>"; } echo '<ul class="alertes">'.$msg.'</ul>'; echo '<form method="post" action="index.php"> <input type="hidden" name="action" value="controler"/> <table> <tr> <td class="titre">Identifiant:</td> <td><input name="id_util" maxlength="20" size="27" type="text"'; if(!empty($_GET)&&isset($_GET['id_util'])) { echo 'value="'.$_GET['id_util'].'"/></td>';} else { echo '/></td>';} echo ' </tr> <tr> <td class="titre">Mot de Passe:</td> <td><input name="mdp_util" maxlength="20" size="27" type="password"></td> </tr> <tr> <td colspan="2"><input type="submit" value="Envoyer"></td> </tr> </table> </form>'; if(ACCES_CREA_COMPTE==true) { echo '<p> Si vous n\'avez pas encore de compte, pour en créer un, <a href="index.php?action=creercompte">cliquez ici</a></p>';} if(!empty($_SESSION['util']['id'])) //Test de la session { echo '<p>Vous êtes déjà identifié: <a href="user/index.php">'.$_SESSION['util']['id'].'</a></p>';} echo '</div></body></html>'; } ?>
Voila je ne sais plus quoi faire, ayant passé de la fonction à l'include, il ne me reste plus beaucoup de solutions...
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187 <?php //Paramètres: $id_util if(isset($_GET['id_util'])&&!empty($_GET['id_util'])) { $id_util=$_GET['id_util'];} $liendb=connect_bdd(); if($id_util) { $sql="SELECT * FROM util WHERE id_util='".$id_util."'"; $temp=requete_bdd($sql); $result=mysql_fetch_assoc($temp); } echo '<table> <tr> <td colspan="2"> <p class="important">(*): champs obligatoires</p> </td> </tr>'; if(is_admin()&&$id_util) { echo '<tr><td class="titre">Identifiant:</td><td><input type="text" name="id_util" value="'.$result['id_util'].'"/></td></tr>';} elseif(is_admin()&&!$id_util) { echo '<tr><td class="titre">Identifiant:</td><td><input type="text" name="id_util"/></td></tr>';} elseif(!is_admin()) { echo '<input type="hidden" name="id_util" value=""/>';} echo ' <tr> <td class="titre">(*) Civilité:</td> <td style="text-align: left;"> <input type="radio" name="civilite_util" value="M" checked="checked"/> Monsieur <br/>'; if(isset($result['civilite_util'])&&$result['civilite_util']=='F') { echo '<input type="radio" name="civilite_util" value="F" checked="checked"/>';} else { echo '<input type="radio" name="civilite_util" value="F"/>';} echo 'Madame <br/>'; if(isset($result['civilite_util'])&&$result['civilite_util']=='L') { echo '<input type="radio" name="civilite_util" value="L" checked="checked"/>';} else { echo '<input type="radio" name="civilite_util" value="L"/>';} echo 'Mademoiselle <br/>'; echo ' </td> </tr> <tr> <td class="titre">(*) Nom:</td>'; if(isset($result['nom_util'])) { echo '<td><input name="nom_util" maxlength="20" size="27" type="text" value="'.$result['nom_util'].'"/></td>';} else { echo '<td><input name="nom_util" maxlength="20" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">(*) Prénom:</td>'; if(isset($result['prenom_util'])) { echo '<td><input name="prenom_util" maxlength="20" size="27" type="text" value="'.$result['prenom_util'].'"/></td>';} else { echo '<td><input name="prenom_util" maxlength="20" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">(*) Mot de passe:</td>'; if(isset($result['mdp_util'])) { echo '<td><input name="mdp_util" maxlength="20" size="27" type="password" value="'.$result['mdp_util'].'"/></td>';} else { echo '<td><input name="mdp_util" maxlength="20" size="27" type="password"/></td>';} echo ' </tr> <tr> <td class="titre">Téléphone interne:</td>'; if(isset($result['tel_int_util'])) { echo '<td><input name="tel_int_util" maxlength="4" size="27" type="text" value="'.$result['tel_int_util'].'"/></td>';} else { echo '<td><input name="tel_int_util" maxlength="4" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">Téléphone direct:</td>'; if(isset($result['tel_dir_util'])) { echo '<td><input name="tel_dir_util" maxlength="10" size="27" type="text" value="'.$result1['tel_dir_util'].'"/></td>';} else { echo '<td><input name="tel_dir_util" maxlength="10" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">Téléphone portable:</td>'; if(isset($result['tel_por_util'])) { echo '<td><input name="tel_port_util" maxlength="10" size="27" type="text" value="'.$result['tel_por_util'].'"/></td>';} else { echo '<td><input name="tel_port_util" maxlength="10" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">Mail:</td>'; if(isset($result['mail_util'])) { echo '<td><input name="mail_util" maxlength="50" size="27" type="text" value="'.$result['mail_util'].'"/></td></tr>';} else { echo '<td><input name="mail_util" maxlength="50" size="27" type="text"/></td></tr>';} if(is_admin()) { echo '<tr> <td class="titre">Acces Informatique:</td> <td><input name="acces_info_util" type="radio" value="O" checked="checked"/> Oui '; if(isset($result['acces_info_util'])&&$result['acces_info_util']=='N') { echo '<input name="acces_info_util" type="radio" value="N" checked="checked"/> Non </td></tr>';} else { echo '<input name="acces_info_util" type="radio" value="N"/> Non <br/></td></tr>';} } else { echo '<input type="hidden" name="acces_info_util" value="O"/>';} echo ' <tr> <td class="titre">Photo:</td> <td><input name="photo_util" type="file"/></td> </tr> <tr> <td class="titre">Localisation:</td>'; if(isset($result['localisation_util'])) { echo '<td><input name="localisation_util" maxlength="20" size="27" type="text" value="'.$result['localisation_util'].'"/></td>';} else { echo '<td><input name="localisation_util" maxlength="20" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">Fonction:</td>'; if(isset($result['fonction_util'])) { echo '<td><input name="fonction_util" maxlength="20" size="27" type="text" value="'.$result['fonction_util'].'"/></td>';} else { echo '<td><input name="fonction_util" maxlength="20" size="27" type="text"/></td>';} echo ' </tr> <tr> <td class="titre">Service:</td> <td><select name="service_util"> <option value="" SELECTED>Aucun ...</option>'; $temp1=requete_bdd("SELECT id_service, designation_service FROM service ORDER BY designation_service"); while($result1=mysql_fetch_assoc($temp1)) { if(isset($result['service_util'])&&$result1['id_service']==$result['service_util']) { echo '<option selected="selected" value="'.$result1['id_service'].'">'.$result1['designation_service'].'</option>';} else { echo '<option value="'.$result1['id_service'].'">'.$result1['designation_service'].'</option>';} } mysql_close($liendb); echo ' </select></td> </tr> <tr> <td class="titre">Jour de repos:</td> <td style="text-align: left;"> <input name="jour_repos_util" type="radio" value="" checked="checked"> Inconnu <br/>'; if(isset($result['jour_repos_util'])=="1") { echo '<input name="jour_repos_util" type="radio" value="1" checked="checked"> Lundi <br/>';} else { echo '<input name="jour_repos_util" type="radio" value="1"> Lundi <br/>';} if(isset($result['jour_repos_util'])=="2") { echo '<input name="jour_repos_util" type="radio" value="2" checked="checked"> Mardi <br/>';} else { echo '<input name="jour_repos_util" type="radio" value="2"> Mardi <br/>';} if(isset($result['jour_repos_util'])=="3") { echo '<input name="jour_repos_util" type="radio" value="3" checked="checked"> Mercredi <br/>';} else { echo '<input name="jour_repos_util" type="radio" value="3"> Mercredi <br/>';} if(isset($result['jour_repos_util'])=="4") { echo '<input name="jour_repos_util" type="radio" value="4" checked="checked"> Jeudi <br/>';} else { echo '<input name="jour_repos_util" type="radio" value="4"> Jeudi <br/>';} if(isset($result['jour_repos_util'])=="5") { echo '<input name="jour_repos_util" type="radio" value="5" checked="checked"> Vendredi <br/>';} else { echo '<input name="jour_repos_util" type="radio" value="5"> Vendredi <br/>';} echo ' </td> </tr> <tr> <td colspan="2"><input type="submit" value="Envoyer"></td> </tr> </table>';
Help me please !*deséspéré*
Partager