Bonjour,
S'il vous plait j'ai utilisé une session pour sauvegarder une variable id_client pour l'utilisé dans un autre fichier.
Dans mon premier fichier ajout_inscription.php je sauvegarde id_client dans une session.
$_SESSION['id_client']=$id_client;
header('Location: commande.php');
dans mon 2eme fichier commande.php j'utilise cette variable comme suit
$var=$_SESSION['id_client'];
$sql1 ="INSERT INTO commande(id_client,date,etat) VALUES ('$var','$date','$etat')";
mais j'ai reçu cette erreure
Notice: Undefined index: id_client in c:\program files\easyphp1-8\www\tp3nv\commande.php on line 14
VOTRE COMMANDE est enregistré correctement
J'ai besoin de vos aide Merci d'avance.