mashamit Posted November 30, 2012 Share Posted November 30, 2012 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 More sharing options...
akphidelt2007 Posted November 30, 2012 Share Posted November 30, 2012 $_SESSION['enquiry][ ] = $id; Link to comment https://forums.phpfreaks.com/topic/271379-session-array-problems/#findComment-1396313 Share on other sites More sharing options...
mashamit Posted November 30, 2012 Author Share Posted November 30, 2012 I thought id have missed something ridiculous. Many thanks Akphidelt2007 Link to comment https://forums.phpfreaks.com/topic/271379-session-array-problems/#findComment-1396423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.