<html>
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<?php
$specialite=$_POST['specialite'];
$nom=$_POST['nom'];$prenom=$_POST['prenom'];$date_naiss=$_POST['date_naiss'];$w_res=$_POST['w_res'];$sexe=$_POST['sexe'];
$tel=$_POST['tel'];$email=$_POST['email'];$universite=$_POST['universite'];$filiere=$_POST['filiere'];
$diplome=$_POST['diplome'];$sp_d=$_POST['sp_d'];$moy1=$_POST['moy1'];$moy2=$_POST['moy2'];$moy3=$_POST['moy3'];
$moy4=$_POST['moy4'];$moy5=$_POST['moy5'];
$nomv=$_POST['nomv'];$prenomv=$_POST['prenomv'];$date_naissv=$_POST['date_naissv'];
$w_resv=$_POST['w_resv'];$sexev=$_POST['sexev'];$universitev=$_POST['universitev'];$filierev=$_POST['filierev'];
$diplomev=$_POST['diplomev'];$sp_dv=$_POST['sp_dv'];$moyv1=$_POST['moyv1'];$moyv2=$_POST['moyv2'];$moyv3=$_POST['moyv3'];
$moyv4=$_POST['moyv4'];$moyv5=$_POST['moyv5'];$etat_d=$_POST['etat_d'];$statut=$_POST['statut'];
$code_e=$_POST['code_e'];$code_c=$_POST['code_c'];
$mat;
$bdd=new PDO('mysql:host=localhost;dbname=iap;charset=utf-8','root','');
$lib=("SELECT max(numero) FROM condidats");
$resultat=$bdd->query($lib);
while($cond=$resultat->fetch()){
$num=$cond['numero'];}
$mat=$specialite.(string)$num;
$req=$bdd->exec("INSERT INTO matricule(specialite) VALUES('$specialite')");
$reqet=$bdd->exec("INSERT INTO condidats(mat,nom,prenom,date_naiss,w_res,sexe,tel,email,universite,
filiere,diplome,sp_d,moy1,moy2,moy3,moy4,moy5,nomv,prenomv,
date_naissv,w_resv,sexev,universitev,filierev,diplomev,sp_dv,
moyv1,moyv2,moyv3,moyv4,moyv5,etat_d,statut,code_e,code_c)
VALUES('$mat','$nom','$prenom','$date_naiss','$w_res','$sexe','$tel','$email','$universite','$filiere','$diplome',
'$sp_d','$moy1','$moy2','$moy3','$moy4','$moy5','$nomv','$prenomv','$date_naissv','$w_resv','$sexev',
'$universitev','$filierev','$diplomev','$sp_dv','$moyv1','$moyv2','$moyv3','$moyv4','$moyv5',
'$etat_d','$statut','$code_e','$code_c')");
?>
</body>
</html>