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