genzedu777 Posted October 10, 2010 Share Posted October 10, 2010 Hi guys, I have coded this, however I have received an error msg, can someone advice me in this? Thank you Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\inetpub\vhosts\abc.com\httpdocs\report.php on line 166 Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, null given in D:\inetpub\vhosts\abc.com\httpdocs\report.php on line 167 <?php $sql = mysqli_query("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC"); while($data = mysqli_fetch_array($sql)) { echo '<input name="district" type="checkbox" id="'.$data['district_id'].'" value="'.$data['district_id'].' class="required" title="Please check at least 1 location."> <label for="'.$data['district_id'].'">'.$data['district_name'].'</label>'; } ?> Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted October 10, 2010 Share Posted October 10, 2010 Warning: mysqli_query() expects at least 2 parameters, 1 given http://www.phpbuilder.com/manual/function.mysqli-query.php Procedural style: mixed mysqli_query ( mysqli link, string query [, int resultmode] ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.