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-10-2007, 01:20 PM   #21 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

You need to replace the <td> bit in the php with this:

Code:
   <td><a href="/resultdetail.php?recordID=<?= $ref; ?>"><?= $ref; ?></a></td>
Assuming that the recordID querystring parameter is the reference..
__________________
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-10-2007, 02:13 PM   #22 (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
Lightbulb perfect..

got it working fine now, only problem is it raises two points, can you delete individual references in the session? and how do you stop them being added twice?
__________________
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, 02:21 PM   #23 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

Quote:
Originally Posted by Almeria Property Place View Post
got it working fine now, only problem is it raises two points, can you delete individual references in the session? and how do you stop them being added twice?
To delete, its a bit cumbersome but here goes:

/delete.php?reference=123

Code:
$old = explode(',' $_SESSION['portfolio']);
$new = '';

foreach($old as $ref) {
   if ($ref != $_GET['reference']) {
      $new .= ',' . $ref;
   }
}

$_SESSION['portfolio'] = $new;

Header('Location: portfolio.php');
And to make sure duplicates aren't added:

Code:
  
   if (strpos($_SESSION['portfolio'], ',' . $_GET['reference']) !== false) {
      // put the code to add to the session here
   }
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale

Last edited by Matthew King; 10-10-2007 at 02:23 PM. Reason: Changed $_SESSION['reference'] to $_SESSION['portfolio'] on the second code example.
Matthew King is offline   Reply With Quote
Old 10-10-2007, 02:29 PM   #24 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

Actually, you can probably get away with this for delete:

Code:
    $_SESSION['portfolio'] = str_replace(',' . $_GET['reference'], '', $_SESSION['portfolio']);
    Header('Location: portfolio.php');
As long as you don't get any problems, that would be far more efficient.
__________________
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-10-2007, 02:59 PM   #25 (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

<?php session_start();

if (strpos($_SESSION['portfolio'], ',' . $_GET['recordID']) !== false) {
$_SESSION['portfolio'] .= ',' .$_GET['recordID'];
}
?>
or like this
<?php session_start();
$_SESSION['portfolio'] .= ',' .$_GET['recordID'];
if (strpos($_SESSION['portfolio'], ',' . $_GET['recordID']) !== false) {
$_SESSION['portfolio'] .= ',' .$_GET['recordID'];
}
?>

cant seem to get it to work either way
__________________
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, 03:04 PM   #26 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

What doesn't work? Does it give an error message?
__________________
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-10-2007, 03:10 PM   #27 (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 the prevent duplicates

with either version above it just adds the record anyway with one version and doesnt add anyrecords with the other. Where should it be placed?
__________________
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, 03:11 PM   #28 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

It should be:

Code:
   if (strpos($_SESSION['portfolio'], ',' . $_GET['recordID']) === false) {
=== instead of !==

Oops
__________________
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-10-2007, 03:17 PM   #29 (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 fantastic..

where does the delete code go or do i need a new page?
__________________
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, 03:19 PM   #30 (permalink)
Rating: 0% (0)
Advancing Real Estate agent
 
Matthew King's Avatar
 
Join Date: Jul 2007
Posts: 95
Default

You'll need a new page for that, and to add another link to the portfolio list page.
__________________
Real Estate Web Developer & SEO Consultant

www.costablancapropertyportal.com | Costa Blanca Property | Javea Property for sale
Matthew King 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 04:29 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