Can someone help with this:
In Tpl File, I have:
Code: Select all
<textarea name="comment"><?php echo $comment; ?></textarea>
<a onclick="$('#comment').submit();" class="button">
<span><?php echo $button_comment; ?></span></a>
In Controller Php File, I have:
Code: Select all
$data['comment'] = $this->request->post['comment'];
Code: Select all
if (($this->request->server['REQUEST_METHOD'] == 'POST')
&& isset($this->request->post['comment'])) {
$this->session->data['comment'] = $this->request->post['comment'];
}
$data['comment'] = (!empty($this->session->data['comment'])) ? $this->session->data['comment'] : 'Rubbish';
Can anyone put me right. I had forgotten what a delight php programming was.