Home About Contact
Spanish Real Estate forum - Spanish property - Estate agents


Website design Find a website designer, discuss website designs and information about designing a property website... Also hosting reviews for those looking for a new host company or to express there opinion of other host companies...

Reply
Old 10-09-2007, 01:30 PM   #11 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

If you navigate to add.php?reference=1 the session should be:

,1

Then if you navigate to add.php?reference=2 the session should be:

,1,2

/portfolio.php should then produce:
1
2

Which is the point where you'd want to look up the reference in the db and get more details. If you're doing all that, and getting something different - let me know and i'll run it here.
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King is offline   Reply With Quote
Old 10-09-2007, 01:43 PM   #12 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Almeria Property Place's Avatar
 
Join Date: Jun 2007
Posts: 97
Send a message via Yahoo to Almeria Property Place Send a message via Skype™ to Almeria Property Place
Default entering into table rows

am getting the list returned as my reference numbers, no probs but just wondered if there was a way of entering each in a separate row
__________________
Jeremy Lister
Almeria Property Place
www.almeriapropertyplace.com
www.albaniapropertyplace.com
jlister@almeriapropertyplace.com
00 34 950 333 465
Almeria Property Place is offline   Reply With Quote
Old 10-09-2007, 02:21 PM   #13 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

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

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King is offline   Reply With Quote
Old 10-09-2007, 02:28 PM   #14 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Almeria Property Place's Avatar
 
Join Date: Jun 2007
Posts: 97
Send a message via Yahoo to Almeria Property Place Send a message via Skype™ to Almeria Property Place
Default no not database

just for display purposes in a table. at the moment when going to portfolio page the references just come up in a list on a separate line (<br/>) just would like to display in a table and have each ref come up in the next row on the table.
__________________
Jeremy Lister
Almeria Property Place
www.almeriapropertyplace.com
www.albaniapropertyplace.com
jlister@almeriapropertyplace.com
00 34 950 333 465
Almeria Property Place is offline   Reply With Quote
Old 10-09-2007, 02:33 PM   #15 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

Ah, thats an easy one then

Code:
<table>
   <tr>
      <th>Reference</th>
   </tr>

<?php
        session_start();

        $references = explode(',' $_SESSION['portfolio']);

        foreach($references as $ref) {
        ?>
           <tr>
                 <td><?= $ref; ?></td>
           </tr>
        <?php
        }
    ?>

</table>
You'd most likely want to do a select in hte foreach loop, to get more info on the property though, such as thumbnail, price etc.
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King is offline   Reply With Quote
Old 10-09-2007, 03:07 PM   #16 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Almeria Property Place's Avatar
 
Join Date: Jun 2007
Posts: 97
Send a message via Yahoo to Almeria Property Place Send a message via Skype™ to Almeria Property Place
Smile thanks for your help

thanks for al your help , but i am still not quite there, i will leave it for another day as i have had enough for today, maybe the portfolio function will have to wait till you build me a real site.
__________________
Jeremy Lister
Almeria Property Place
www.almeriapropertyplace.com
www.albaniapropertyplace.com
jlister@almeriapropertyplace.com
00 34 950 333 465
Almeria Property Place is offline   Reply With Quote
Old 10-09-2007, 05:01 PM   #17 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

No problem, let me know if you need any other pointers.
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King is offline   Reply With Quote
Old 10-09-2007, 06:02 PM   #18 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Almeria Property Place's Avatar
 
Join Date: Jun 2007
Posts: 97
Send a message via Yahoo to Almeria Property Place Send a message via Skype™ to Almeria Property Place
Smile still need loads...

would love to get it working but i think its a bit too cheeky to keep asking you , so i will keep at it all week and get it done in the end as you have given me the general idea, thanks, i will either have it up and running on the site by friday or i will have thrown the computer out with a big hole in it!!!!!
__________________
Jeremy Lister
Almeria Property Place
www.almeriapropertyplace.com
www.albaniapropertyplace.com
jlister@almeriapropertyplace.com
00 34 950 333 465
Almeria Property Place is offline   Reply With Quote
Old 10-10-2007, 06:34 AM   #19 (permalink)
Rating: 0% (0)
CB Web - Costa Blanca web design / SEO
 
mikeinspain's Avatar
 
Join Date: May 2007
Location: Torrevieja
Posts: 36
Send a message via MSN to mikeinspain Send a message via Yahoo to mikeinspain Send a message via Skype™ to mikeinspain
Default Another option

Jeremy Hi..

Just another resource if you happen to get stuck and no else is available at the time to help on this forum.. Check out this forum/site.

http://www.thescripts.com/forum/forum128.html

This is a community based site also. The above link will take you directly to the PHP forum, although they cover many other languages.
__________________
Regards

Mike

Web Design // Internet Marketing // eCommerce Solutions

mikeinspain is offline   Reply With Quote
Old 10-10-2007, 10:18 AM   #20 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Almeria Property Place's Avatar
 
Join Date: Jun 2007
Posts: 97
Send a message via Yahoo to Almeria Property Place Send a message via Skype™ to Almeria Property Place
Default Matthew, just one more question...

...now i have the property references displaying in a table on the portfolio page, how do i create a link from each to its corresponding property on the database, so the client looks at his list of references and clicks one to view the property?
__________________
Jeremy Lister
Almeria Property Place
www.almeriapropertyplace.com
www.albaniapropertyplace.com
jlister@almeriapropertyplace.com
00 34 950 333 465
Almeria Property Place is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +2. The time now is 03:59 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Skin purchased from CompletevB
Inactive Reminders By Icora Web Design

Copyright 2008 © Spanish Real Estate Forum

Our / partners websites:



Forum Navigation
Spanish property for sale

Accreditation of International Real Estate Professionals


Costa Blanca forum

Alphashare - Real Estate management software

Free Spanish agent advertising for 1 year!


Forum Staff
Colin S
- Hamiltons of London

Homefinder
- Villaservers

andypropertyswapshop
- Property Swap Shop

gregor
- 123 Businesses for sale

top-tour-of-spain
- Top Tour of Spain

Girasol Homes
- Girasol Homes

wood1e
- En Casa Baleares
Areas in Spain
Partner Websites
English speaking jobs in Spain