select query in view file in codeigniter [duplicate]
This is my simple php html code. <select id="district" name="district"> <option value="">Select district</option> <?php $sql="SELECT * FROM district"; $result = mysqli_query($sql); while($row = mysqli_fetch_array($result)) { $district_id = $row['district_id'] ; $district_name = $row['district_name']; ?> <option value="<?php echo $district_id;?>"><?php echo $district_name;?></option> <?php } ?> </select> But it's not working. database is autoloaded.What will be the problem.
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.