Mini Shell

Direktori : /home/rizant5/public_html-1210/student/
Upload File :
Current File : //home/rizant5/public_html-1210/student/get-topic-ajax.php

<?php 
require_once("../config.php");
$chapter_id=$_POST['chapter_id'];
$subid=$_POST['subid'];
$datas=$conn->prepare("select * from chapters where chapter_id='$chapter_id'");
$datas->execute();$results=$datas->fetch();?>
<div class="box-body">
               <div class="col-sm-12">
			   <?php
echo "<h4 class='chap-head center'>$results[chapter_name]</h4>";
echo $results['chapter_desc'];
?>
<hr />
<h4 class="top-head center"><?php echo"$results[chapter_name]";?></h4>
 <table class="table table-bordered table-striped" >
                 <tbody>
                 	<?php  $data=$conn->prepare("select * from topics where chapter_id='$chapter_id'");
					$data->execute();$result=$data->fetchall();
					foreach($result as $row){
						echo "<tr>";
						echo "<td ";if((!empty($_COOKIE['topic_id']))&&($_COOKIE['topic_id']==$row['topic_id'])){echo"class='current'";} echo"id='$row[topic_id]'><a href='read-topic.php?topic_id=$row[topic_id]&subid=$subid' title='Read Topic' class='td-a'>$row[topic_name]</a></td>";
						echo "</tr>";
					}
					?>
                 </tbody>
                 </table>
              </div>
            </div><!-- /.box-body -->                 

Zerion Mini Shell 1.0