Voila, j'ais créé un formulaire permettant aux memebres de mon site demodifier leurs info, j'ais donc fais une requete SQL pour que dans les champs les infos actuelles s'affichent, et il y a un probleme.... J'ais commenter ce code pr que vous compreniez mon systeme. :::
<?
// lors du login, mes membres recoivent une id permettan
//d'identifier leur logo, elle se trouve dans une session, le
//probleme ne vient pas de la c'est sur.
$userid = $_SESSION["userid"];
//connection au serveur MySQL
$db = mysql_connect('localhost', psedo, 'mot de passe');
//Conection a la base de donnée
mysql_select_db('test',$db);
//requete
$sql = "SELECT id, pseudo, age, ville, mdp, prenom, email, emailp, msn, url FROM user WHERE id='$userid'";
//envoi de la requete
$req = mysql_query($sql) or die('Erreur SQL : <br />'.$sql);
//creation du formulaire
echo'
<form action="profil-sql.php" method="post"><table width="500" border="1" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2" scope="col">'.$data[pseudo].' --> Mon profil : </th>
</tr>
<tr>
<td width="121"><span class="Style4">>Votre pseudo : </span></td>
<td width="373"><span class="Style4">
<input name="pseudo" type="text" class="Style8" value="'.$data[pseudo].'" size="50"></span></td>
</tr>
<tr>
<td><strong>>Votre MDP : </strong></td>
<td><input name="mdp" type="text" class="Style8" value="'.$data[mdp].'" size="50"></td>
</tr>
<tr>
<td><span class="Style4">>Prénom : </span></td>
<td><span class="Style4"><input name="prenom" type="text" class="Style8" value="'.$data[prenom].'" size="50"></span></td>
</tr>
<tr>
<td class="Style4">>Age : </td>
<td><input name="age" type="text" class="Style8" value="'.$data[age].'" size="50"></td>
</tr>
<tr>
<td class="Style4">>Ville : </td>
<td><input name="ville" type="text" class="Style8" value="'.$data[ville].'" size="50"></td>
</tr>
<tr>
<td><span class="Style4">>Email : </span></td>
<td><span class="Style4"><input name="email" type="text" class="Style8" value="'.$data[email].'" size="50"></span></td>
</tr>
<tr>
<td class="Style4">>Email (public) : </td>
<td><input name="emailp" type="text" class="Style8" value="'.$data[emailp].'" size="50"></td>
</tr>
<tr>
<td class="Style4">>MSN (public) : </td>
<td><input name="msn" type="text" class="Style8" value="'.$data[msn].'" size="50"></td>
</tr>
<tr>
<td><span class="Style4">>Site Web : </span></td>
<td><span class="Style4"><input name="url" type="text" class="Style8" value="'.$data[url].'" size="50">
</span></td>
</tr>
<tr>
<td colspan="2"><div align="center" class="Style8">
<div align="center"><input type="submit" value="Envoyer"><br>
<a href="profil.php">Profil </a>| Préférences | Déconnexion </div>
</div></td>
</tr>
</table>
</form>';
?>
VOila et le probleme c'est que quand j'accede a ma page ca me met ces erreurs :
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 41
Notice: Use of undefined constant pseudo - assumed 'pseudo' in c:\easyphp1-7\www\test\profil.php on line 45
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 45
Notice: Use of undefined constant mdp - assumed 'mdp' in c:\easyphp1-7\www\test\profil.php on line 54
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 54
Notice: Use of undefined constant prenom - assumed 'prenom' in c:\easyphp1-7\www\test\profil.php on line 58
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 58
Notice: Use of undefined constant age - assumed 'age' in c:\easyphp1-7\www\test\profil.php on line 62
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 62
Notice: Use of undefined constant ville - assumed 'ville' in c:\easyphp1-7\www\test\profil.php on line 66
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 66
Notice: Use of undefined constant email - assumed 'email' in c:\easyphp1-7\www\test\profil.php on line 70
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 70
Notice: Use of undefined constant emailp - assumed 'emailp' in c:\easyphp1-7\www\test\profil.php on line 74
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 74
Notice: Use of undefined constant msn - assumed 'msn' in c:\easyphp1-7\www\test\profil.php on line 78
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 78
Notice: Use of undefined constant url - assumed 'url' in c:\easyphp1-7\www\test\profil.php on line 82
Notice: Undefined variable: data in c:\easyphp1-7\www\test\profil.php on line 82
Voila, en esperant que vous pourrez m'aider, merci ;)