[eluser]crwtrue[/eluser]
I have been making a new version of my old php program with codeigniter and so far so good but i would like to know couple of things how they are normally done:
First thing is that in my program i make query to database to get one row which is now in codeigniter version readed in to a array. I also need the fields of that table cause i am using that query to fill a form where you can update the information. So now it is like this:
$data[0] = $q-list_fields();
$data[1] = $q->row_array();
does that look a normal solution?
Also in the form i had javascript code to validate the form(i had also code in php for later
) and now it is in the view like this
[Javascript tag]
.
Code for the form validation
.
[Javascript tag]
<?php
THE CODE FOR THE FORM
?>
[Javascript tag]
new validateForm(document.forms['example'])
[Javascript tag]
This works but is this also a normal way to make programs with codeigniter?