Search.php - by Real Estate Agents & other variables

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 12, 2012   (RSS)

Re: [csdesign] Search.php - by Real Estate Agents & other variables

By Jason - April 11, 2012

Hi Tina,

The problem here is that you are searching against the createdByUserNum of the property field (which is the num field of the accounts section) but for the option value of your select field, your using the record number of the homepages section.

If the agents are the ones that also create the homepages record, you could use the createdByUserNum field here as well like this:

<select name="createdByUserNum">
<option value="">-Select-</option>
<?php foreach($homepagesRecords as $homepages): ?>
<option value="<?php echo $homepages['createdByUseNum'];?>"><?php echo $homepages['fullname'];?></option>
<?php endforeach ?>
</select>


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Search.php - by Real Estate Agents & other variables

By csdesign - April 12, 2012

Hi Jason! Thanks!!

I was the user that created both of their homepage records so I went back in and I had already set both individual bios as being created by each individual user (agent).

I swapped out the code, but I'm still getting the same results "no listings were found". I tried searching JUST by the user also... and that brought the same result "no listings".

I checked the code from the site online:

<select name="createdByUserNum">
<option value="">-Select-</option>

<option value="
Notice: Undefined index: createdByUseNum in /hsphere/local/home/lyleandcindy/dunhamrealestateservices.com/search2.php on line 101
">Cindy Dunham</option>

<option value="
Notice: Undefined index: createdByUseNum in /hsphere/local/home/lyleandcindy/dunhamrealestateservices.com/search2.php on line 101
">Lyle Dunham</option>

</select>


Line 101 is this:

<option value="<?php echo $homepages['createdByUseNum'];?>"><?php echo $homepages['fullname'];?></option>

Any thoughts? Thanks again for your help!! T

Re: [csdesign] Search.php - by Real Estate Agents & other variables

By Jason - April 12, 2012

Hi,

ooops, there's a small typo in the code, we're missing an "r".


Try this:

<option value="<?php echo $homepages['createdByUserNum'];?>"><?php echo $homepages['fullname'];?></option>

hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Search.php - by Real Estate Agents & other variables

By csdesign - April 12, 2012

PERFECT!! thanks a ton Jason!