comment corriger ce message: Deprecated: mysql_db_query()
Bonjour
j'ai le message suivant dans le code suivant:
Citation:
Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in C:\wamp\www\info\connexion.php on line 14
insertion avec echec
Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in C:\wamp\www\info\connexion.php on line 23
formulaire inscription:
Code:
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
|
<form action="connexion.php" method="get" enctype="multipart/form-data">
<table width="70%" border="1">
<tr>
<td>Nom</td>
<td><label>
<input type="text" name="nom" id="nom">
</label></td>
</tr>
<tr>
<td>Prenom</td>
<td><label>
<input type="text" name="prenom" id="prenom">
</label></td>
</tr>
<tr>
<td>Adresse</td>
<td><label>
<input name="adresse" type="text" id="adresse" size="30">
</label></td>
</tr>
<tr>
<td>Code Postale</td>
<td><label>
<input type="text" name="cp" id="cp">
</label></td>
</tr>
<tr>
<td>Telephone</td>
<td><label>
<input type="text" name="telephone" id="telephone">
</label></td>
</tr>
<tr>
<td>Region</td>
<td><label>
<select name="region" id="region">
<option>---Selection---</option>
<option>Tunis Ville</option>
<option>Tunis Nord</option>
<option>Tunis Sud</option>
<option>Sfax</option>
<option>Sahel sud</option>
<option>El Mansa</option>
<option>Carthage</option>
</select>
</label></td>
</tr>
<tr>
<td>Sexe</td>
<td><label>
<input type="radio" name="sexe" id="sexe" value="sexe">
Male<br>
<input type="radio" name="sexe" id="sexe2" value="sexe">
Femelle</label></td>
</tr>
<tr>
<td>Email</td>
<td><label>
<input type="text" name="email" id="email">
</label></td>
</tr>
<tr>
<td>Photo</td>
<td><label>
<input type="file" name=" photo_id" id=" photo_id">
</label></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Envoyer" id="Envoyer" value="Envoyer">
<input type="reset" name="Retablir" id="Retablir" value="Réinitialiser"></td>
</tr>
</table>
</form> |
la page connexion et insertion dans la base
Code:
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
|
<?php
$nom=$_GET['nom'];
$prenom=$_GET['prenom'];
$adresse=$_GET['adresse'];
$cp=$_GET['cp'];
$telephone=$_GET['telephone'];
$region=$_GET['region'];
$sexe=$_GET['sexe'];
$email=$_GET['email'];
$photo_id=$_GET['photo_id'];
@mysql_connect("localhost","root") or die("Echec connexion");
$sql="insert into personne(nom,prenom,adresse,cp,telephone,region,sexe,email,photo_id) values('$nom','$prenom','$adresse','$cp','$telephone','$region','$sexe','$email','photo_id')";
$sql1="commit";
$requete=mysql_db_query("info",$sql);
if($requete)
{
echo("insertion succes");
}
else
{
echo("insertion avec echec");
}
$requete=mysql_db_query("info",$sql1)
?> |