我在我的表externalclient中创建搜索 我在externalclientController.php
中尝试了这段代码char[]
我创建了search.ctp
public function search()
{
//performs the search
//tells this method to use the index.ctp View to display the results
//rather than looking for search.ctp
$this->view = 'index';
}
我添加到index.ctp的最后一件事
<?php
echo $this->Form->create('first_name',['action' => 'search']);
?>
<table cellpadding="2" cellspacing="2" width="50%" border="0">
<tr>
<td>Select Client</td>
<td> Enter Client Name</td>
</tr>
<tr>
<td>
<?php echo $this->Form->select('first_name', $externalClient,['empty' => ' ',
'label'=>'']); ?>
</td>
<td><?php echo $this->Form->input('name', ['label' =>'']); ?></td>
<td>
<?php echo $this->Form->submit(__('Search Client', true),
['name' => 'Search', 'div' => false]);?>
</td>
</tr>
</table>
<?= $this->Form->end() ?>
... 之后它给了我这个错误: