saku saku - 2 years ago 162
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 Source

Try this

<?php echo form_open('loder/task1', array('onsubmit' => 'return checkDifferance();'));?>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download