I just want to ask because I'm working on Codeigniter and I'm have a button in home page wherein if click, it will page redirect to registration page.
<input type='button' onClick='<?php redirect(base_url() . 'register/index'); ?>' />
I also tried the form helper.
<body>
<?php
$data = array('register' => array('name' => 'register',
'id' => 'register',
'value' => 'TRUE',
'type' => 'button',
'content' => 'Register',
'onClick' => redirect(base_url() . 'register/index')
);
?>
<table border="1">
<tr>
<td><?php echo form_button(element('register', $data, )); ?></td>
<td></td>
</tr>
</table>
</body>
The problem is nothing happens when I try to click the button.