forked from vishaloshnif/school-erp-system
/
ajax_stream_code1.php
executable file
·35 lines (29 loc) · 1.19 KB
/
ajax_stream_code1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php include_once("config/config.inc.php");ob_start();
$class_id=$_GET['class_id'];
$sql2="SELECT * FROM class where class_id='".$class_id."' and stream_status='1'";
$class=mysql_fetch_array(mysql_query($sql2));
if($class['class_name']!="")
{
?>
<div class="form_grid_12">
<label class="field_title">Stream</label>
<div class="form_input">
<select name="stream" class="chzn-select" tabindex="13">
<option value="">---select stream---</option>
<?php
$i=1;
$sql="SELECT * FROM allocate_class_stream where class_id='".$class_id."' ";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res))
{
$sql2="SELECT * FROM stream where stream_id='".$row['stream_id']."'";
$stream=mysql_fetch_array(mysql_query($sql2));
?> <option value="<?php echo $row['stream_id']; ?>"><?php echo $stream['stream_name']; ?></option>
<?php
}
?>
</select>
<span class=" label_intro">Stream name</span>
</div>
</div>
<?php } ?>