08-04-2007, 12:56 PM
C'est encore faux ^^
Code PHP :
<?php
session_start();
$id = $_SESSION['id'];
include 'connexion.php';
$sql= "SELECT qstockvehicule, qstock1, stock1, stockvehicule FROM membres WHERE id = " . $id ."";
$res=mysql_query($sql) or die('Erreur SQL '.$sql.'<br>'.mysql_error());
$data = mysql_fetch_object($res);
$data = $row->qstockvehicule;
$var= $row->stock1;
$variable= $row->stockvehicule;
if ($data['qstockvehicule'] < 30 && $var['stock1'] == $variable['stockvehicule']);
{
$rsa = "UPDATE membres SET qstockvehicule= qstockvehicule + qstock1, stockvehicule=stock1, ustockvehicule=ustock1+0.1, stock1='./objet/rien.gif', qstock1='0', exp=exp+0.1, hab=hab+0.1, mp='Vous venez de stocker dans votre véhicule' WHERE id = " . $id ."";
$rsa = mysql_query($rsa) or die('Erreur SQL '.$rsa.'<br>'.mysql_error());
if($rsa)
{
$_SESSION['qstockvehicule']= $data['qstockvehicule'] + $data['qstock1'];
$_SESSION['stockvehicule']= $_SESSION['stock1'];
$_SESSION['ustockvehicule']=$_SESSION['ustock1']+0.1;
$_SESSION['stock1']= './objet/rien.gif';
$_SESSION['qstock1']= '0';
$_SESSION['exp']=$_SESSION['exp']+0.1;
$_SESSION['hab']=$_SESSION['hab']+0.1;
$_SESSION['mp']= 'vous venez de stocker dans votre véhicule';
}
header("Location: page_membre.php");
}
else
{
if ($data['qstockvehicule'] < 30 && $var['stock1'] != $variable['stockvehicule']);
echo '<center><font color="red">transfert impossible, ce ne sont pas les memes ressources !</font></center><center><font color="black"><a href="affichestock1.php">retour</a></font></center>';
else
echo '<center><font color="red">Votre stock est plein !</font></center><center><font color="black"><a href="affichestock1.php">retour</a></font></center>';
}
mysql_close();
?>
Voili voiloou