<?php
session_start();
$id = $_SESSION['id'];
include 'connexion.php';
$sql= 'SELECT qstockvehicule,qstock1 FROM membres WHERE id = ' . $id .' ';
$res=mysql_query($sql) or die('Erreur SQL '.$sql.'<br>'.mysql_error());
($data = mysql_fetch_assoc($res));
if ($data['qstockvehicule'] < 30)
{
$rsa = 'UPDATE membres SET qstockvehicule = qstockvehicule + qstock1 WHERE id = ' . $id . ' ';
if($rsa){
$_SESSION['qstockvehicule']= $_SESSION['qstockvehicule']+qstock1;
}
header("Location: page_membre.php");
}
mysql_close();
?>
session_start();
$id = $_SESSION['id'];
include 'connexion.php';
$sql= 'SELECT qstockvehicule,qstock1 FROM membres WHERE id = ' . $id .' ';
$res=mysql_query($sql) or die('Erreur SQL '.$sql.'<br>'.mysql_error());
($data = mysql_fetch_assoc($res));
if ($data['qstockvehicule'] < 30)
{
$rsa = 'UPDATE membres SET qstockvehicule = qstockvehicule + qstock1 WHERE id = ' . $id . ' ';
if($rsa){
$_SESSION['qstockvehicule']= $_SESSION['qstockvehicule']+qstock1;
}
header("Location: page_membre.php");
}
mysql_close();
?>