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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.