You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
PROJET-WEB_STRI1A/WEB/voiture/old/showVoiture.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);
}
?>