Condition and keyword
8 posts by 2 authors in: Forums > CMS Builder
Last Post: January 16, 2008 (RSS)
By Djulia - January 15, 2008
I would like to obtain the value of keyword.
I used Print_r to check if the value were available, but keyword is always given without value.
For :
<xmp><?php print_r($record); ?></xmp>
the value is always : [keywords] =>
I would like to obtain a condition :
<?php if ($keyword == ""): ?> ...
An idea ?
Thank you for your assistance.
Djulia
Re: [Djulia] Condition and keyword
By Dave - January 15, 2008
If it's a form field, you can display it like this:
<?php echo $FORM['keyword'] ?>
also, you can try print_r($FORM);
interactivetools.com
Re: [Dave] Condition and keyword
By Djulia - January 15, 2008
It is exactly what I seek. [:)]
Thank you, Dave.
Re: [Dave] Condition and keyword
By Djulia - January 15, 2008 - edited: January 15, 2008
If my search is done on several column, how to build my condition?
For example with "and" or "or" ?
<?php if ($FORM['content_keyword'] and $FORM['tags_keyword'] == ""): ?>
...
<?php else: ?>
...
<?php endif ?>
Thank you for your answer.
Djulia
Re: [Djulia] Condition and keyword
By Dave - January 15, 2008
Note: If you're using the latest version you can search multiple fields for the same keyword like this:
content,tags_keyword
or
title,summary,content_keyword
Hope that helps!
interactivetools.com
Re: [Dave] Condition and keyword
By Djulia - January 15, 2008 - edited: January 15, 2008
You want to say :
<input type="text" name="tags,title,content_keyword" value="" size="15">
That does not function for me.
Djulia
Re: [Djulia] Condition and keyword
By Djulia - January 15, 2008
It is my condition which was incorrect.
Djulia
Re: [Djulia] Condition and keyword
By Dave - January 16, 2008
interactivetools.com