Hi all,
This issue may be due to going down completely the wrong road to resolve another issue I have posted in the forum but, I have a list of blogs being displayed and I can assign a creating author to each blog by using <?php echo $record['createdBy.fullname'];?> which appears to take the authors Name from the accounts table which is just what we want.
However I also want to be able to allow viewers to filter the blogs by author and have a search form as below which I had hoped would work using the same variable but it doesnt work, when included on the page it stops anything after the filter form from loading.
If someone could advise whether
a) using the <?php echo $record['createdBy.fullname'];?> to display an author name is the correct way to do it - and
b) If it is the correct way, how should I incorporate it into my filter.
Thanks in advance for any help provided, filter code provided below.
<form method="post" action="blog_list.php">
<h3> Filter by Author</h3>
<select name="createdBy.fullname">
<?php foreach (getListOptions('bridlington_blogs', 'createdBy.fullname') as $value => $label): ?>
<option value = "<?php echo $value;?>" <?php selectedIf($value, @$_REQUEST['createdBy.fullname']);?>>
<?php echo $label; ?></option>
<?php endforeach ?>
</select>
<br/>
<div align="center">
<input type="submit" name="search" value=" Show Blogs "/>
</div>
</form>