include 'include/connect.php'; include 'include/Form.php'; include '../admin/topmenu.php'; ?> $fld="sub_name"; $fldname=explode(",",$fld); $lbl="Subject name"; $lblname=explode(",",$lbl); if($actn=="Delete") { mysql_query("delete from subject where sub_id='$id'"); } $sql="select * from subject order by sub_name"; if($sql) { $result=mysql_query($sql); //disp_addnew_link('Addedit_subject.php','Add New'); print "
Manage subjects |Add new | ||||||||
---|---|---|---|---|---|---|---|---|
Edit"; print " | Delete"; while($rs=mysql_fetch_object($result)) { if($formbg=="datarowwhite") $formbg="datarowgrey"; else $formbg="datarowwhite"; print " | |||||||
".stripslashes($rs->$x)." | "; } $chk=mysql_num_rows(mysql_query("select * from question where sub_id='$rs->sub_id'")); print "sub_id>Edit"; if($chk==0) print " | sub_id')>Delete | "; else print ""; print " | |||||
Note: Subjects related to existing questions cannot be deleted. |