Quote:
Originally Posted by Matthew King Yes, you'd want something like this:
To add a property to portfolio:
e.g. /add.php?reference=1 Code: <?php
session_start();
$_SESSION['portfolio'] .= ',' . $_GET['reference'];
?>
Then to get the references back:
e.g. /portfolio.php Code: <?php
session_start();
$references = explode(',' $_SESSION['portfolio']);
foreach($references as $ref) {
print($ref) . '<br />';
}
?>
I haven't written any PHP properly for ages, so excuse me if there are any syntax errors there. Should give you a good starting point though.
Matthew |
i only seem to get the comma in the quote marks storing in the session, how do i send the actual reference number to the session? i have tried the inserting the url link instead of the comma but it doesnt like it.