Jump to content

Need some help in this code


genzedu777

Recommended Posts

Hi,

 

Could anyone tell me if there is anything wrong with my code?

 

Will this code clashed, since i call for $data['district_id'] & $data['district_name']

<label for="'.$data['district_id'].'">'.$data['district_name'].'</label>';

 

 

<?php

$sql = mysqli_query("SELECT * FROM tutor_preferred_district ORDER BY district_id ASC");

while($data = mysql_fetch_array($sql))

{

echo '<input name="district" type="checkbox" id="'.$data['district_id'].'" value="'.$data['district_id'].'">

<label for="'.$data['district_id'].'">'.$data['district_name'].'</label>';

}

?>

Link to comment
https://forums.phpfreaks.com/topic/215545-need-some-help-in-this-code/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.