Bonjour
voila lorsque je rajoute un article dans mon panier il me le rajoute mais ne me met pas tout ce que je lui demande. Voici l'erreur:

Notice: Undefined index: an in C:\Program Files\EasyPHP 2.0b1\www\panieroriginal.php on line 18
et voici mon code:
le panier:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
 
function creationPanier()
{
	$ret=false;
 
	if (isset( $_SESSION['panier']))
	{
		$ret = true;
	} 
	else
	{
		$_SESSION['panier']=array();
		$_SESSION['panier']['Nom_auteur'] = array();
		$_SESSION['panier']['Titre'] = array();      
		$_SESSION['panier']['Prix_vente_euro'] = array();
		$_SESSION['panier']['Annee'] = array();      
		$ret=true;
	}
		return $ret;
}

Et le lien pour ajouter l'article au panier:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
<a href=\"panieroriginal.php?action=ajout&amp;au=".$req2['Nom_auteur']."&amp;t=".$req2['Titre']."&amp;p=".$req2['Prix_vente_euro'].";an=".$req2['Annee']."&amp;\" onclick='window.open(this.href, '', 'toolbar=no, location=no, directories=no, status=yes, scrollbars=yes, resizable=yes, copyhistory=no, width=600, height=350'); return false;'>Ajouter au panier</a>
la fonction permettant d'ajouterun article:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function ajouterArticle($Nom_auteur,$Titre,$Prix_vente_euro,$Annee)
{
	if (creationPanier())
	{
		array_push( $_SESSION['panier']['Nom_auteur'],$Nom_auteur);
		array_push( $_SESSION['panier']['Titre'],$Titre); 
		array_push( $_SESSION['panier']['Prix_vente_euro'],$Prix_vente_euro);
		array_push( $_SESSION['panier']['Annee'],$Annee);      
	}
 
	else
	{
		echo "Un problème est survenu veuillez contacter l'administrateur du site.";
	}	
}