Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
define("MYHOST","mysql:host=localhost;dbname=$base;");
define("MYUSER","root");
define("MYPASS","");
$con = new PDO(MYHOST,MYUSER,MYPASS);
?>
<form action="ajouter_adh.php" method="POST">
Votre nom :<input type="text" name="nom" id="nom"> <br>
votre prenom : <input type="text" name="pren" id="pren"><br>
Votre adresse<input type="text" name="adresse" id="adresse"><br>
<input type="submit" value="Envoyer">
</form>
<?php
$base = 'brassens' ;
include("connexion.php") ;
if(isset($_POST['nom']) &&isset($_POST['pren'])&& isset($_POST['adresse']) ) {
$nom = $_POST['nom'] ;
$pren = $_POST['pren'] ;
$adresse = $_POST["adresse"] ;
$reg = "INSERT INTO adherent (id,nom,prenom,adresse) VALUES (NULL , '$nom' , '$pren' , '$adresse')" ;
$regquex = $con->exec($reg) ;
}
?>
<form action="ajouter_com.php" method="POST">
Nom commune:<input type="text" name="commune" id="commune">
Code postale : <input type="text" name="cdpost" id="cdpost">
<input type="submit" value="Envoyez">
</form>
<?php
$base = 'brassens' ;
include("connexion.php") ;
if(isset($_POST['commune']) && isset($_POST['cdpost']) ) {
$commune = $_POST['commune'] ;
$cdpost = $_POST['cdpost'] ;
$reg = "INSERT INTO codepostal (id,nomcommune,codepostal) VALUES (NULL , '$commune' , '$cdpost')" ;
$regquex = $con->exec($reg) ;
}
?>
<form action="#" method="POST">
id : <input type="number" name="id" id="id"> <br>
<input type="submit" value="Envoyez">
</form>
<?php
$base = 'brassens' ;
include("connexion.php") ;
if (isset($_POST["id"])) {
$id = $_POST["id"] ;
$req="SELECT * FROM adherent" ;
$reqex=$con->query($req);
while($ligne=$reqex->fetch(PDO::FETCH_NUM)){
if ($id === $ligne[0]) {
echo $ligne[1]." ".$ligne[2] . " " . $ligne[3];
}
}
}
?>