PROJET-WEB_STRI1A/WEB/voiture/old/showVoiture.php

32 lines
739 B
PHP
Raw Normal View History

<?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);
}
?>