Jump to content

Session Array Problems


mashamit

Recommended Posts

Good Evening Guys,

 

This will probably seem a ridiculously easy query, but its annoying the life out of me.

 

Im creating a small wishlist that will eventually email to a contact address.

 

On each page will be an add to wishlist button.

 

What I have so far is

 

session_start() <--- on each page

 

$_SESSION['enquiry']=array(); <--- on the first page

 

wish list link goes to file:

 

<?php session_start();

$id = $_GET['rugid'];

 

$_SESSION['enquiry'] = $id;

 

echo "added to wishlist";

?>

 

but when every I print_r the array, it just has the last added item..... what am I doing wrong.

 

Any help would be greatly appreciated

 

 

Nick

Link to comment
https://forums.phpfreaks.com/topic/271379-session-array-problems/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.