Linked to a detail page on search results

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 3, 2014   (RSS)

By Jesus - July 1, 2014

Hi,

I'm trying to link to a detail page on a search results page, but I'm getting this error message:

Notice: Undefined variable: record in /home/userdomain/public_html/url/searchResults.php on line 341

Any ideas? I'm sure I'm missing something but can't figure it out.

Thanks in advance for your help!

Jesus

By Dave - July 3, 2014

Hi Jesus, 

What I suspect is that you've got a different variable name other than $record, so maybe you have some code like this:

<?php foreach ($newsRecords as $newsRecord): ?>

Where it's referring to each news record as $newsRecord (no trailing s) and your code is referencing $record.

Try changing $record to whatever the variable after the "as" is named in the code.

Let me know if that works for you.

Dave Edis - Senior Developer
interactivetools.com