Base des données du site
mouradbatchen
Messages postés
29
Date d'inscription
Statut
Membre
Dernière intervention
-
cotta Messages postés 294 Date d'inscription Statut Membre Dernière intervention -
cotta Messages postés 294 Date d'inscription Statut Membre Dernière intervention -
Bonjour,
mon PFE est création d'un site web dynamique, j'ai construit les interfaces avec dreamweaver et me reste la base des données et sa connection.
j'ai aucune idée pour faire la base des données. svp pouvez vous m'aider
et merci
mon PFE est création d'un site web dynamique, j'ai construit les interfaces avec dreamweaver et me reste la base des données et sa connection.
j'ai aucune idée pour faire la base des données. svp pouvez vous m'aider
et merci
A voir également:
- Base des données du site
- Site de telechargement - Accueil - Outils
- Site comme coco - Accueil - Réseaux sociaux
- Site pour vendre des objets d'occasion - Guide
- Site pour partager des photos - Guide
- Quel site remplace coco - Accueil - Réseaux sociaux
24 réponses
non je fais id= Medinumt(9)
est ce qu'il faut changer
autre chose quand j'ai ouvri la code que tu as examiner, le couleur n'apparu pas et la forme du tableau se change
est ce qu'il faut changer
autre chose quand j'ai ouvri la code que tu as examiner, le couleur n'apparu pas et la forme du tableau se change
slt
j'ai ajouté le code css mais il reste le meme
svp regarder le et voir et dis moi qu'est ce qu'il manque et merci beaucoup
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:327px;
top:57px;
width:356px;
height:635px;
z-index:1;
background-color: #00CCFF;
}
#Layer2 {
position:absolute;
left:404px;
top:69px;
width:186px;
height:31px;
z-index:2;
}
.Style1 {
color: #CC0000;
font-weight: bold;
}
#Layer3 {
position:absolute;
left:356px;
top:159px;
width:40px;
height:26px;
z-index:3;
}
#Layer4 {
position:absolute;
left:439px;
top:157px;
width:147px;
height:25px;
z-index:4;
}
#Layer5 {
position:absolute;
left:356px;
top:212px;
width:55px;
height:28px;
z-index:5;
}
#Layer6 {
position:absolute;
left:441px;
top:213px;
width:145px;
height:24px;
z-index:6;
}
#Layer7 {
position:absolute;
left:358px;
top:270px;
width:50px;
height:25px;
z-index:7;
}
#Layer8 {
position:absolute;
left:439px;
top:272px;
width:152px;
height:22px;
z-index:8;
}
#Layer9 {
position:absolute;
left:382px;
top:338px;
width:259px;
height:24px;
z-index:9;
}
#Layer10 {
position:absolute;
left:349px;
top:410px;
width:90px;
height:35px;
z-index:10;
}
#Layer11 {
position:absolute;
left:449px;
top:416px;
width:147px;
height:27px;
z-index:11;
}
#Layer12 {
position:absolute;
left:349px;
top:479px;
width:91px;
height:28px;
z-index:12;
}
#Layer13 {
position:absolute;
left:452px;
top:485px;
width:145px;
height:26px;
z-index:13;
}
#Layer14 {
position:absolute;
left:440px;
top:636px;
width:55px;
height:21px;
z-index:14;
}
#Layer15 {
position:absolute;
left:523px;
top:632px;
width:64px;
height:29px;
z-index:15;
}
#Layer17 {
position:absolute;
left:348px;
top:545px;
width:92px;
height:27px;
z-index:14;
}
#Layer18 {
position:absolute;
left:456px;
top:547px;
width:147px;
height:20px;
z-index:15;
}
#Layer19 {
position:absolute;
left:439px;
top:650px;
width:60px;
height:27px;
z-index:16;
}
#Layer20 {
position:absolute;
left:519px;
top:649px;
width:50px;
height:27px;
z-index:17;
}
-->
</style>
</head>
<body><table width="80%" border="1" align="center"><form action="Achat-revue.php" method="post" name="form_achat">
<tr>
<td width="20%">Nom * </td>
<td width="80%"><input name="nom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td>Prenom *</td>
<td><input name="prenom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td>E-mail *</td>
<td><input name="mail" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td colspan="2">Revue Normal<strong> : 10 dinars Tunisienne <br />
</strong>Revue spécial<strong> : 20 dinars Tunisienne</strong></td>
</tr>
<tr>
<td>Liste des revues</td>
<td>
<select name="lr" size="1" onchange="MM_jumpMenu('parent',this,0)">
<option>listes Revues</option>
<option>Revue n°1</option>
<option>Revue n°2</option>
<option>Revue n°3</option>
<option>Revue n°4</option>
<option>Revue n°5</option>
<option>Revue n°6</option>
<option>Revue Special de 1994</option>
<option>Revue n°7</option>
<option>Revue n°8</option>
<option>Revue n°9</option>
<option>Revue Special de 1996</option>
<option>Revue n°10</option>
<option>Revue n°11</option>
<option>Revue n°12</option>
<option>Revue n°13</option>
<option>Revue n°14</option>
<option>Revue n°15</option>
<option>Revue n°16</option>
<option>Revue n°17</option>
<option>Revue n°:18</option>
<option>Revue n°19 Special / 2 vol 40 D/T</option>
<option>Revue n°20 Special</option>
<option>Revue n°21 Special</option>
</select> </td>
</tr>
<tr>
<td>Numéro carte E-dinar *</td>
<td><input name="carte" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td>Code secret *</td>
<td><input name="code" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td height="36"> </td>
<td>
<label>
<input type="submit" name="Valider" id="Valider" value="Envoyer" onclick="">
</label>
<input name="Effacer" type="reset" value="Effacer" id="reset" >
</form>
<tr>
<td> </td>
<td><div align="right">Les champs marqué d'une * sont obligatoires</div></td>
</tr>
</table>
La deuxiéme page c'est celle de l'exécution de la requéte : nommée ds le formulaire Achat-revue.php)
<?php
$localhost="localhost"; //Nom du l'hote
$user="root"; //Nom de user
$password="";// Mot de passe de user
$base ="site_web"; //le nom de votre base// ";
$table ="revues"; //la table sur laquelle ce script va enrengistrer les donnees //
mysql_connect($localhost,$user,$password) or die ("Pb connexion serveur ".mysql_error());
mysql_select_db($base) or die ("Pb selection base ".mysql_error());
// récupération des variables du formulaire
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$revue= $_POST['revue'];
$e_mail= $_POST['mail'];
$lr= $_POST['lr'];
$carte= $_POST['carte'];
$code = $_POST['code'];
//test sur la connexion
// Insertion des données dans la table alerte mail formulaire
$insertion= mysql_query("INSERT INTO revues (id, nom, prenom, adresse, e-mail, revue, carte, code) VALUES ('', '" ,'$nom', '$prenom', '$revue','$e_mail','$lr','$carte' ");
or die("Erreur lors de l'exécution de la requête.<br />\nRequête : ". $insertion ."<br />\nMessage d'erreur : ". mysql_error());
//Si on arrive ici, c'est que tout s'est bien déroulé : on affiche le message de réussite */
echo "<p>Insertion des données dans la table ". $table ." réussie</p>\n";
mysql_close() ;
?>
</body>
</html>
j'ai ajouté le code css mais il reste le meme
svp regarder le et voir et dis moi qu'est ce qu'il manque et merci beaucoup
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
left:327px;
top:57px;
width:356px;
height:635px;
z-index:1;
background-color: #00CCFF;
}
#Layer2 {
position:absolute;
left:404px;
top:69px;
width:186px;
height:31px;
z-index:2;
}
.Style1 {
color: #CC0000;
font-weight: bold;
}
#Layer3 {
position:absolute;
left:356px;
top:159px;
width:40px;
height:26px;
z-index:3;
}
#Layer4 {
position:absolute;
left:439px;
top:157px;
width:147px;
height:25px;
z-index:4;
}
#Layer5 {
position:absolute;
left:356px;
top:212px;
width:55px;
height:28px;
z-index:5;
}
#Layer6 {
position:absolute;
left:441px;
top:213px;
width:145px;
height:24px;
z-index:6;
}
#Layer7 {
position:absolute;
left:358px;
top:270px;
width:50px;
height:25px;
z-index:7;
}
#Layer8 {
position:absolute;
left:439px;
top:272px;
width:152px;
height:22px;
z-index:8;
}
#Layer9 {
position:absolute;
left:382px;
top:338px;
width:259px;
height:24px;
z-index:9;
}
#Layer10 {
position:absolute;
left:349px;
top:410px;
width:90px;
height:35px;
z-index:10;
}
#Layer11 {
position:absolute;
left:449px;
top:416px;
width:147px;
height:27px;
z-index:11;
}
#Layer12 {
position:absolute;
left:349px;
top:479px;
width:91px;
height:28px;
z-index:12;
}
#Layer13 {
position:absolute;
left:452px;
top:485px;
width:145px;
height:26px;
z-index:13;
}
#Layer14 {
position:absolute;
left:440px;
top:636px;
width:55px;
height:21px;
z-index:14;
}
#Layer15 {
position:absolute;
left:523px;
top:632px;
width:64px;
height:29px;
z-index:15;
}
#Layer17 {
position:absolute;
left:348px;
top:545px;
width:92px;
height:27px;
z-index:14;
}
#Layer18 {
position:absolute;
left:456px;
top:547px;
width:147px;
height:20px;
z-index:15;
}
#Layer19 {
position:absolute;
left:439px;
top:650px;
width:60px;
height:27px;
z-index:16;
}
#Layer20 {
position:absolute;
left:519px;
top:649px;
width:50px;
height:27px;
z-index:17;
}
-->
</style>
</head>
<body><table width="80%" border="1" align="center"><form action="Achat-revue.php" method="post" name="form_achat">
<tr>
<td width="20%">Nom * </td>
<td width="80%"><input name="nom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td>Prenom *</td>
<td><input name="prenom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td>E-mail *</td>
<td><input name="mail" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td colspan="2">Revue Normal<strong> : 10 dinars Tunisienne <br />
</strong>Revue spécial<strong> : 20 dinars Tunisienne</strong></td>
</tr>
<tr>
<td>Liste des revues</td>
<td>
<select name="lr" size="1" onchange="MM_jumpMenu('parent',this,0)">
<option>listes Revues</option>
<option>Revue n°1</option>
<option>Revue n°2</option>
<option>Revue n°3</option>
<option>Revue n°4</option>
<option>Revue n°5</option>
<option>Revue n°6</option>
<option>Revue Special de 1994</option>
<option>Revue n°7</option>
<option>Revue n°8</option>
<option>Revue n°9</option>
<option>Revue Special de 1996</option>
<option>Revue n°10</option>
<option>Revue n°11</option>
<option>Revue n°12</option>
<option>Revue n°13</option>
<option>Revue n°14</option>
<option>Revue n°15</option>
<option>Revue n°16</option>
<option>Revue n°17</option>
<option>Revue n°:18</option>
<option>Revue n°19 Special / 2 vol 40 D/T</option>
<option>Revue n°20 Special</option>
<option>Revue n°21 Special</option>
</select> </td>
</tr>
<tr>
<td>Numéro carte E-dinar *</td>
<td><input name="carte" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td>Code secret *</td>
<td><input name="code" type="text" size="70" maxlength="100" /></td>
</tr>
<tr>
<td height="36"> </td>
<td>
<label>
<input type="submit" name="Valider" id="Valider" value="Envoyer" onclick="">
</label>
<input name="Effacer" type="reset" value="Effacer" id="reset" >
</form>
<tr>
<td> </td>
<td><div align="right">Les champs marqué d'une * sont obligatoires</div></td>
</tr>
</table>
La deuxiéme page c'est celle de l'exécution de la requéte : nommée ds le formulaire Achat-revue.php)
<?php
$localhost="localhost"; //Nom du l'hote
$user="root"; //Nom de user
$password="";// Mot de passe de user
$base ="site_web"; //le nom de votre base// ";
$table ="revues"; //la table sur laquelle ce script va enrengistrer les donnees //
mysql_connect($localhost,$user,$password) or die ("Pb connexion serveur ".mysql_error());
mysql_select_db($base) or die ("Pb selection base ".mysql_error());
// récupération des variables du formulaire
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$revue= $_POST['revue'];
$e_mail= $_POST['mail'];
$lr= $_POST['lr'];
$carte= $_POST['carte'];
$code = $_POST['code'];
//test sur la connexion
// Insertion des données dans la table alerte mail formulaire
$insertion= mysql_query("INSERT INTO revues (id, nom, prenom, adresse, e-mail, revue, carte, code) VALUES ('', '" ,'$nom', '$prenom', '$revue','$e_mail','$lr','$carte' ");
or die("Erreur lors de l'exécution de la requête.<br />\nRequête : ". $insertion ."<br />\nMessage d'erreur : ". mysql_error());
//Si on arrive ici, c'est que tout s'est bien déroulé : on affiche le message de réussite */
echo "<p>Insertion des données dans la table ". $table ." réussie</p>\n";
mysql_close() ;
?>
</body>
</html>
met àc entre le "title" et le "head" :
<LINK REL=stylesheet TYPE="text/css" HREF="include/style.css">
<table width="500" height="635" border="0" align="center" class="layer1">
<form action="Achat-revue.php" method="post" name="form_achat">
<tr>
<td width="300">Nom * </td>
<td width="250"><input name="nom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td width="300">Prenom *</td>
<td><input name="prenom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td width="300">E-mail *</td>
<td><input name="mail" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td colspan="2">Revue Normal<strong> : 10 dinars Tunisienne <br />
</strong>Revue spécial<strong> : 20 dinars Tunisienne</strong></td>
</tr>
<tr>
<td width="300">Liste des revues</td>
<td width="250">
<select name="lr" size="1" onchange="MM_jumpMenu('parent',this,0)">
<option>listes Revues</option>
<option>Revue n°1</option>
<option>Revue n°2</option>
<option>Revue n°3</option>
<option>Revue n°4</option>
<option>Revue n°5</option>
<option>Revue n°6</option>
<option>Revue Special de 1994</option>
<option>Revue n°7</option>
<option>Revue n°8</option>
<option>Revue n°9</option>
<option>Revue Special de 1996</option>
<option>Revue n°10</option>
<option>Revue n°11</option>
<option>Revue n°12</option>
<option>Revue n°13</option>
<option>Revue n°14</option>
<option>Revue n°15</option>
<option>Revue n°16</option>
<option>Revue n°17</option>
<option>Revue n°:18</option>
<option>Revue n°19 Special / 2 vol 40 D/T</option>
<option>Revue n°20 Special</option>
<option>Revue n°21 Special</option>
</select> </td>
</tr>
<tr>
<td width="300">Numéro carte E-dinar *</td>
<td><input name="carte" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td width="300">Code secret *</td>
<td><input name="code" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td width="300" height="36"> </td>
<td>
<label>
<input type="submit" name="Valider" id="Valider" value="Envoyer" onclick="">
</label>
<input name="Effacer" type="reset" value="Effacer" id="reset" >
</form>
<tr>
<td width="300"> </td>
<td> </td>
</tr>
<tr>
<td width="300"> </td>
<td><div align="right">Les champs marqué d'une * sont obligatoires</div></td>
</tr>
</table>
essaye de mettre des test sur le champ de l'e-mail pour savoir si c'est une forme d'e-mail ou pas, autre chose ps d'espace ici "Achat revue.php".
<LINK REL=stylesheet TYPE="text/css" HREF="include/style.css">
<table width="500" height="635" border="0" align="center" class="layer1">
<form action="Achat-revue.php" method="post" name="form_achat">
<tr>
<td width="300">Nom * </td>
<td width="250"><input name="nom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td width="300">Prenom *</td>
<td><input name="prenom" type="text" size="20" maxlength="100" /></td>
</tr>
<tr>
<td width="300">E-mail *</td>
<td><input name="mail" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td colspan="2">Revue Normal<strong> : 10 dinars Tunisienne <br />
</strong>Revue spécial<strong> : 20 dinars Tunisienne</strong></td>
</tr>
<tr>
<td width="300">Liste des revues</td>
<td width="250">
<select name="lr" size="1" onchange="MM_jumpMenu('parent',this,0)">
<option>listes Revues</option>
<option>Revue n°1</option>
<option>Revue n°2</option>
<option>Revue n°3</option>
<option>Revue n°4</option>
<option>Revue n°5</option>
<option>Revue n°6</option>
<option>Revue Special de 1994</option>
<option>Revue n°7</option>
<option>Revue n°8</option>
<option>Revue n°9</option>
<option>Revue Special de 1996</option>
<option>Revue n°10</option>
<option>Revue n°11</option>
<option>Revue n°12</option>
<option>Revue n°13</option>
<option>Revue n°14</option>
<option>Revue n°15</option>
<option>Revue n°16</option>
<option>Revue n°17</option>
<option>Revue n°:18</option>
<option>Revue n°19 Special / 2 vol 40 D/T</option>
<option>Revue n°20 Special</option>
<option>Revue n°21 Special</option>
</select> </td>
</tr>
<tr>
<td width="300">Numéro carte E-dinar *</td>
<td><input name="carte" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td width="300">Code secret *</td>
<td><input name="code" type="text" size="50" maxlength="100" /></td>
</tr>
<tr>
<td width="300" height="36"> </td>
<td>
<label>
<input type="submit" name="Valider" id="Valider" value="Envoyer" onclick="">
</label>
<input name="Effacer" type="reset" value="Effacer" id="reset" >
</form>
<tr>
<td width="300"> </td>
<td> </td>
</tr>
<tr>
<td width="300"> </td>
<td><div align="right">Les champs marqué d'une * sont obligatoires</div></td>
</tr>
</table>
essaye de mettre des test sur le champ de l'e-mail pour savoir si c'est une forme d'e-mail ou pas, autre chose ps d'espace ici "Achat revue.php".
je pense qu'il faut changer le type de ton Id, car chaque fois qu'on enregistre les données, on va affecté un Id pour chaque utilisateur, ça va se faire automatiquement.