Thread: php sessions
View Single Post
Old 10-05-2007, 12:58 PM   #4 (permalink)
Rating: 0% (0)
Matthew King
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

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
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King is offline   Reply With Quote
 

Spanish Real Estate Forum - Members newest adverts
CH5 New Villa Costa Azahar
A Castle in Spain
Costa Azahar Village House for sale
CHL Investment Opportunity Coasta Azahar
Cervera del Maestre Property