saku saku - 6 months ago 69
PHP Question

How to convert onsubmit to form_open

My code is like this:

<form action="http://<?php echo site_url();?>/loader/task1" onsubmit="return checkDifferance();" method="post">


How to convert this onsubmit to form_open? How to improve the code below?

<?php echo form_open('loder/task1');?>

Answer

Try this

<?php echo form_open('loder/task1', array('onsubmit' => 'return checkDifferance();'));?>
Comments