32 lines
739 B
PHP
32 lines
739 B
PHP
|
<?php
|
|||
|
//require ('../connectionBD.php');
|
|||
|
//$mail = null;
|
|||
|
//$db = connexionBD();
|
|||
|
//init();
|
|||
|
|
|||
|
if(isset($_POST['submit']))
|
|||
|
{
|
|||
|
showVoiture();
|
|||
|
}
|
|||
|
|
|||
|
function init(){
|
|||
|
session_start();
|
|||
|
global $mail;
|
|||
|
//Si on est pas connecté redirection vers la page de connexion
|
|||
|
if(!isset($_SESSION['mail'])){
|
|||
|
header('Location: ../index.php');
|
|||
|
exit();
|
|||
|
}
|
|||
|
else{
|
|||
|
$mail = $_SESSION['mail'];
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
function showVoiture(){
|
|||
|
//global $db;
|
|||
|
$requete = "UPDATE 'public'.'voiture' SET ('matricule','marque','modele','nbplaces','anneefab') = ('"global $matricule"','"global $marque"','"global $modele"','"global $nbplaces"','"global $anneefab"') WHERE mail = "$_SESSION['mail']";";
|
|||
|
echo "requete =".$requete;
|
|||
|
//pg_query($db, $requete);
|
|||
|
}
|
|||
|
?>
|