Multiple Selection List = where Filter

16 posts by 2 authors in: Forums > CMS Builder
Last Post: January 28, 2009   (RSS)

By Dave - January 27, 2009

In that case the field probably isn't defined (probably because there is no record). You can force a variable to be a "string" by putting it in double quotes.

Try this:

<?php if (strpos("{$summer_academy_locationsRecord['location']}", "{$record['summer_location']"}) !== false) { continue; } ?>

Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Multiple Selection List = where Filter

you were right...i forgot to add that page tag to the record.... it displays now with the other php code....

how can i have it display the "end if php" code if there are no records?

The most recent code you replied with gave me this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting '}' in /home/highview/public_html/apexFinal/summerlocation_details.php on line 172

By Dave - January 27, 2009

Sorry, try this. Today is a typo kind of day it seems..

<?php if (strpos("{$summer_academy_locationsRecord['location']}", "{$record['summer_location']}") !== false) { continue; } ?>

And you can display an error if there is no record loaded with some code like this at the top:

// error if page not found
if (!@$summer_academy_locationsRecord) {
header("HTTP/1.1 404 Not Found");
print "<h1>404 File Not Found!</h1>";
exit;
}


Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Multiple Selection List = where Filter

ok... thats not exactly what i need..

I just realized the strpos code isnt working how i need it either...

I think the best thing would be for me to email you login to my cms so you can see how everything is functioning...

By Dave - January 28, 2009

Sure, I can take a look. I'm at dave@interactivetools.com
Dave Edis - Senior Developer
interactivetools.com