D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
diafrica
/
result.dominicaninstitute.org
/
Filename :
editstudent.php
back
Copy
<?php if (!$_SESSION){ session_start(); } $acc=$_SESSION['acc']; $yto=$_SESSION['yto']; if(isset($acc) && ($acc=="administratoroftheduresult2018byto")){?> <?php include("Connecter/dataconn.php"); ?> <?php if (isset($_GET['tab'])) { unset($temp); if(isset($_GET['tab'])){ $_GET['tab']=trim($_GET['tab']); if(preg_match('/^[0-9]/u',$_GET['tab'])){ settype($_GET['tab'], 'int'); $temp=(int)$_GET['tab']; } } if(!isset($temp)){echo "Sorry! Wrong Data!"; exit();} $editab=$temp; $query_dio=sprintf("select * from students where sn = %s", mysql_real_escape_string($editab)); $dio = mysql_query($query_dio, $csn) or die(mysql_error()); $row_dio = mysql_fetch_assoc($dio); $totalRows_dio = mysql_num_rows($dio); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <?php include("head.php"); ?> <link rel="stylesheet" type="text/css" href="cal/dhtmlxcalendar.css"> <link rel="stylesheet" type="text/css" href="cal/skins/dhtmlxcalendar_dhx_web.css"> <script src="cal/dhtmlxcalendar.js"></script> <script> function doOnLoad() { var myCalendar = new dhtmlXCalendarObject(["dob"]); myCalendar.setSkin('dhx_web'); myCalendar.setWeekStartDay=7; myCalendar.setDateFormat("%Y-%m-%d"); myCalendar.hideTime(); } </script> </head> <body> <?php include("top.php"); ?> <?php include("dtable0.php"); ?> <?php include("nav.php"); ?> <?php include("dtable1.php"); ?> <?php include("topcontainer.php"); ?> <!--Content Goes Here--> <div class="headingbiggest">Edit Student</div> <p> </p> <form action="dadmin.php" method="post" name="form1" id="form1"> <table width="100%"> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Matric No</td> <td style="font-size:9px;"><input name="matric" id="matric" size="40" type="text" value="<?php echo($row_dio['matric']); ?>" readonly="readonly" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Password</td> <td style="font-size:9px;"><input name="passwrd" id="passwrd" size="40" type="text" value="<?php echo($row_dio['passwrd']); ?>" required="required" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Surname</td> <td style="font-size:9px;"><input name="surname" id="surname" size="40" type="text" value="<?php echo($row_dio['surname']); ?>" required="required" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Firstname</td> <td style="font-size:9px;"><input name="firstname" id="firstname" size="40" type="text" value="<?php echo($row_dio['firstname']); ?>" required="required" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Other Names</td> <td style="font-size:9px;"><input name="othernames" id="othernames" size="40" type="text" value="<?php echo($row_dio['othernames']); ?>" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Date of Birth</td> <td style="font-size:9px;"><input name="dob" id="dob" size="18" type="text" readonly="readonly" value="<?php echo($row_dio['dob']); ?>" onmousedown="doOnLoad();" /></td></tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Year of Entry</td> <td style="font-size:9px;"><input name="yearofentry" id="yearofentry" size="8" type="text" maxlength="4" value="<?php echo($row_dio['yearofentry']); ?>" required="required" readonly="readonly" /></td></tr> <tr valign="top"> <td style="font-weight:bold; text-align:right">Programme of Study</td> <td><select name="programmesn" disabled="disabled"> <option value="<?php echo($row_dio['programmesn']); ?>" selected="selected"> <?php $sql="select * from programmes where sn = " . $row_dio['programmesn']; $result=mysql_query($sql); $row=mysql_fetch_array($result); echo($row['namer']); ?> <?php $sql2="select * from departments where sn=".$row['departmentsn']; $result2=mysql_query($sql2); $row2=mysql_fetch_array($result2); echo("[ in ".$row2['namer']." ]"); ?> </option> <?php $sql="select * from programmes"; $result=mysql_query($sql); while($row=mysql_fetch_array($result)) { ?> <option value="<?php echo($row['sn']); ?>"><?php echo($row['namer']); ?> <?php $sql2="select * from departments where sn=".$row['departmentsn']; $result2=mysql_query($sql2); $row2=mysql_fetch_array($result2); echo("[ in ".$row2['namer']." ]"); ?> </option> <?php } ?> </select></td> </tr> <tr valign="top"><td width="150" style="font-weight:bold; text-align:right">Direct Entry</td> <td style="font-size:9px;"> <select name="de" disabled="disabled"> <option value="<?php echo($row_dio['de']); ?>" selected="selected"><?php echo($row_dio['de']); ?></option> <option value=""></option> <option value="DE">DE</option> </select> </td></tr> <tr valign="top"> <td style="text-align:right; font-size:10px;" colspan="2"><a href="dadmin.php">Cancel</a> <input name="editstudent" type="submit" id="editstudent" value=" Edit Record " /> <input name="sn" type="hidden" value="<?php echo ($row_dio['sn']); ?>" /> </td> </tr> </table> </form> <!--Content Ends Here--> <?php include("bottomcontainer.php"); ?> <?php include("dtable2.php"); ?> <?php include("side.php"); ?> <?php include("dtable3.php"); ?> <?php include("foot.php"); ?> </body> </html> <?php } else { include("dadmin.php"); } ?> <?php } else { include("ddadmin.php"); }?>