- <?php
- $link = mysqli_connect('localhost','mahdi','***','valiasr');
- mysqli_set_charset($link,'utf8');
- $query = "select * from colleges";
- $result = mysqli_query($link,$query);
- $rows = mysqli_fetch_all($result,MYSQLI_ASSOC);
- foreach($rows as $row )
- {
- echo "<input type='checkbox' class='college' value="."$row[id]".">" .$row['name']." ";
- }
- ?>
college