[eluser]Daryl W[/eluser]
I am trying to use the form button helper "form_button()" to build a button that will link back to the controller like this:
<?php $data = array(
'name' => 'button',
'class' => 'button1',
'content' => 'Signup',
'onclick' => anchor('login/signup')
);?>
<?php echo form_button($data);?>
Which does not return the href correctly. for form_button helper interprates the first comma in the anchor helper as the end of the onclick parameter.
I can get this to work but it bypasses the controller:
<?php echo form_button('button','Signup','onclick="location.href=\'http://localhost/ds_con/login/signup\'"');?>
just not the button built with the data array.
Many thanks,
Daryl