By row, I assume that you mean database row? If you want to store these in the database, then you don't need to be keeping them in the session. Instead your add.php would be something like this:
Code:
session_start();
// open your db connection here
// put together sql string
$sql = 'INSERT INTO portfolio (session_id, reference) VALUES (\'' . session_id() . '\','\' . mysql_real_escape_string($_GET['reference']) . '\';
// execute the sql
// redirect user
Then on your portfolio page, execute this:
Code:
'SELECT reference FROM portfolio WHERE session_id = ' . session_id();
That will still only last for the length of the session though (about 20 minutes after inactivity, so alone - there's no point in storing it in the database. You'd probably want to give the user the opportunity to save their portfolio before they leave, by entering their email address. Then you can do this:
Code:
'INSERT INTO portfolio_owner (session_id, email) VALUES (\'' . session_id() . '\',\'' . mysql_real_escape_string($_POST['email']) . '\'';
Then their portfolio can always be found again when they enter their email address. Now this is gradually getting more complicated, but thats how things go.
Best of luck.