voilla mon script de mon formulaire et en rouge c'est ma requette et ma connection a ma base
2 question :
-le script de mon formulaire et a metre tous en bas du script de la page?
-le script ci dessous et il bon?
mon formulaire :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Document sans nom</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body,td,th {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
color: #ff0000;
font-weight: bold;
}
body {
background-color: #00000;
}
a {
font-size: 12px;
color: #000000;
font-weight: bold;
font-style: italic;
}
a:link {
text-decoration: underline;
}
a:visited {
text-decoration: underline;
color: #000000;
}
a:hover {
text-decoration: none;
color: #000000;
}
a:active {
text-decoration: underline;
color: #000000;
}
-->
</style></head>
<body>
<p> </p>
<p> </p>
<form name="inscription" method="post" action="membre">
<table width="200" border="0" align="center">
<tr>
<td><div align="center" class="Style2"> - Inscritption - </div></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<table width="537" height="199" border="0" align="center">
<tr>
<td width="167"><div align="center" class="Style6">prenom : </div></td>
<td width="360" align="right"><input name="nom" type="text" id="nom"></td>
</tr>
<tr>
<td><div align="center">
<DIV align="center" class="Style4"><span class="Style2">age :</span></DIV>
<strong><span class="Style4"></span>Prénom : </strong></div></td>
<td align="right"><input name="prenom" type="text" id="prenom"></td>
</tr>
<tr>
<td><div align="center"><strong>E</strong>
<DIV align="center" class="Style6">Email : </DIV>
<strong>mail : </strong></div></td>
<td align="right"><input name="email" type="text" id="email"></td>
</tr>
<tr>
<td><div align="center">
<DIV align="center" class="Style6">Pseudo : </DIV>
<strong>Pseudo : </strong></div></td>
<td align="right"><input name="pseudo" type="text" id="pseudo"></td>
</tr>
<tr>
<td height="52"><div align="center"><strong> d</strong><span class="Style6"> Mot de passe :</span></div></td>
<td align="right"><input name="pass" type="password" id="pass"></td>
</tr>
</table>
<table width="300" border="0" align="center">
<tr>
<td>
<div align="center">
<input type="reset" name="Submit2" value="Effacer">
<input type="submit" name="Submit" value="Envoyer">
</div></td><?
// Paramètres persos
$host = "sql.free.fr"; // voir hébergeur
$user = "pap.underground"; // vide ou "root" en local
$pass = "****mot de passe****"; // vide en local
$bdd = "membre"; // nom de la BD
// connexion
@mysql_connect($host,$user,$pass)
or die("Impossible de se connecter");
@mysql_select_db("$bdd")
or die("Impossible de se connecter");
?>
</tr>
</table>
</form><?
mysql_connect("sql.free.fr","pap.underground","****mot de passe***");
mysql_select_db("pap.underground"); // il faut changer les paramètres de connexion à la base mysql
$mimi = mysql_query("UPDATE membre SET confirm='1' WHERE pseudo='$_GET[pseudo]'") or die ('erreur : '.mysql_error());
echo 'Votre compte est validé, cliqez <a href="connexion.php">ici</a> pour vous connecter<br>';
?>
</body>
</html>
</td></tr></table></div>
</div>
</body>
</html>