Welcome Guest, Not a member yet? Register   Sign In
how to fetch data from database automatically on first load
#1

[eluser]ranjitbd[/eluser]
i can retrieve data from database when any event triggers like click on button or a link.

but in my index page a search criteria box is there where 4 combo box is exist for user search option.

i have to fetch data from database when the page is loaded. earlier i have done this with flat php.
the code is showing below:

//city selection box

Code:
<select name="city" id="city">
     <option value="0">select city</option>
          &lt;?php
        $sql= "select * from city_info" ;
        $result = mysql_query($sql, $db);
        while($row = mysql_fetch_array($result))
            {?&gt;
                          <option value="&lt;?php echo $row['CITY_CODE'];?&gt;">&lt;?php echo $row['CITY_NAME'];?&gt;</option>
                   &lt;?php } ?&gt;
</select>

but now what to do with CI


Messages In This Thread
how to fetch data from database automatically on first load - by El Forum - 08-30-2009, 06:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB