Jump to content

girlzz

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Everything posted by girlzz

  1. hello sir.. i had some problem... i want to make 3 chained selected box but right now i had done just 2 chained select box.. how i want to do another chained box?? <script type="text/javascript" src="ajax.js"></script> <script type="text/javascript"> var ajax = new Array(); function getCityList(sel) { var countryCode = sel.options[sel.selectedIndex].value; document.getElementById('dhtmlgoodies_city').options.length = 0; // Empty city select box if(countryCode.length>0){ var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = 'getCities.php?countryCode='+countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function createCities(index) { var obj = document.getElementById('dhtmlgoodies_city'); eval(ajax[index].response); // Executing the response from Ajax as Javascript code } </script> <tr> <td width="131" height="24"><span class="style36">Year</span>: </td> <td width="360"><select name="dhtmlgoodies_country" id="dhtmlgoodies_country" onChange="getCityList(this)"> <option value="">Select a year</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> </td> </tr> <tr> <td height="24"><span class="style36">Block</span>: </td> <td><select name="dhtmlgoodies_city" id="dhtmlgoodies_city"> </select> </td> </tr> <tr> <td class="style28" >Subject Code:</td> <td class="style28" ><select name="s_code" id="s_code"> <option value="-">-</option> <option value="MED 3111">MED 3111</option> <option value="MED 3211">MED 3211</option> <option value="MED 3311">MED 3311</option> <option value="MED 3411">MED 3411</option> <option value="MED 3411">MED 3411</option> <option value="MED 4112">MED 4112</option> <option value="MED 4212">MED 4212</option> <option value="MED 4402">MED 4402</option> <option value="MED 4502">MED 4502</option> <option value="MED 4602">MED 4602</option> <option value="MED 4702">MED 4702</option> <option value="MED 5108">MED 5108</option> <option value="MED 5208">MED 5208</option> <option value="MED 5308">MED 5308</option> <option value="MED 5408">MED 5408</option> <option value="MED 5508">MED 5508</option> </select></td> i had make block is choose from year but i doesn't know how to create select box where subject code is filter from year and block....
  2. thank you sir... but the matric no you set value as '50'..if the matric no want to retrieve from the database,how i want to display those matric no?
  3. <?php do { ?> <tr> <td height="39" scope="col"><input name="matric_no[]" type="text" id="matric_no" value="<?php echo $row_test['matric_no']; ?>" size="10" readonly></td> <td scope="col"><input name="cam" type="int" id="cam" size="8" /></td> <td scope="col" ><input name="final_exam" type="int" id="final_exam" size="8" /></td> <td scope="col"><input name="total" type="int" id="total" size="8" onClick="calculate()" readonly/></td> <td scope="col"><input name="grade" type="text" id="grade" size="8" readonly/></td> </tr> </table>
  4. ook this is my php including html coding <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } } if(isset($_POST['matric_no']) && sizeof($_POST['matric_no'])>0){ $matric_no = $_GET[matric_no]; $query_mat = "SELECT matric_no FROM medic_exam WHERE matric_no='$matric_no' "; $mat = mysql_query($query_mat, $mas) or die(mysql_error()); $row_mat = mysql_fetch_assoc($mat); if ($row_mat) { echo("<script type=\"text/javascript\">"); echo("alert('Result already been entered');"); echo("</script>"); } else { for($i=0;$i<count($_POST['matric_no']);$i++){ $insertSQL = sprintf("INSERT INTO medic_exam (matric_no, sessi, `year`, `group`, s_code, title, cam, final_exam,total,grade) VALUES (%s, %s, %s, %s,%s, %s, %s, %s, %s, %s )", GetSQLValueString($_POST['matric_no'][$i], "text"), GetSQLValueString($_POST['sessi'], "text"), GetSQLValueString($_POST['year'], "text"), GetSQLValueString($_POST['group'], "int"), GetSQLValueString($_POST['s_code'], "text"), GetSQLValueString($_POST['s_title'], "text"), GetSQLValueString($_POST['cam'], "int"), GetSQLValueString($_POST['final_exam'], "int"), GetSQLValueString($_POST['total'], "int"), GetSQLValueString($_POST['grade'], "text")); mysql_select_db($database_mas, $mas); $Result = mysql_query($insertSQL, $mas) or die(mysql_error()); $saved = true; } } } $colname_test = "-1"; if (isset($_GET['s_code'])) { $colname_test = $_GET['s_code']; } $session =$_GET['session']; $year = $_GET['year']; if ($session ==0) { echo("<script type=\"text/javascript\">"); echo("alert('Data not found.Please enter the required data.');"); echo("window.location=\"exm.php\""); echo("</script>"); } if ($year ==0) { echo("<script type=\"text/javascript\">"); echo("alert('Data not found.Please enter the required data.');"); echo("window.location=\"exm.php\""); echo("</script>"); } mysql_select_db($database_mas, $mas); $query_test = sprintf("SELECT * FROM medic_registered_course WHERE s_code = %s", GetSQLValueString($colname_test, "text")); $test = mysql_query($query_test, $mas) or die(mysql_error()); $row_test = mysql_fetch_assoc($test); $totalRows_test = mysql_num_rows($test); if ($totalRows_test==0) { echo("<script type=\"text/javascript\">"); echo("alert('Data not found.Please enter the required data.');"); echo("window.location=\"exm.php\""); echo("</script>"); } mysql_select_db($database_mas, $mas); $s_code=$_GET[s_code]; $search=$_GET[search]; $year= $_GET[year]; $sessi= $_GET[session]; $query_test = "SELECT * FROM medic_registered_course WHERE medic_registered_course.s_code='$s_code' AND medic_registered_course.group='$search' and year= '$year' and sessi = '$sessi' "; $test = mysql_query($query_test, $mas) or die(mysql_error()); $row_test = mysql_fetch_assoc($test); if ($row_test==0) { echo("<script type=\"text/javascript\">"); echo("alert('Data not found.Please enter the required data.');"); echo("window.location=\"exm.php\""); echo("</script>"); } mysql_select_db($database_mas, $mas); $query_Recordset2 = sprintf("SELECT medic_subject_offered.s_code, medic_subject_offered.s_title FROM medic_subject_offered WHERE medic_subject_offered.s_code LIKE '%%%s%%'" , $colname_test); $Recordset2 = mysql_query($query_Recordset2, $mas) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2); if ($totalRows_Recordset2==0) { echo("<script type=\"text/javascript\">"); echo("alert('Data not found.Please enter the required data.');"); echo("window.location=\"exm.php\""); echo("</script>"); } ?> <html> <head> <title>List Registered Subject | Medic Assessment System</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="keywords" content="Keywords here"> <meta name="description" content="Description here"> <meta name="Author" content="Joseph De Araujo"> <meta name="Publisher" content="MyFreeTemplates.com"> <meta name="robots" content="index, follow"> <!-- (robot commands: all, none, index, no index, follow, no follow) --> <meta name="revisit-after" content="30 days"> <meta name="distribution" content="global"> <meta name="rating" content="general"> <meta name="content-language" content="english"> <title>Class List View | Medic Assessment System</title> <script language="JavaScript" type="text/JavaScript" src="images/myfreetemplates.js"></script> <style type="text/css"> <!-- .basestyle { color: #FFFFFF; font-size: 10px; font-family: Verdana, Arial, Helvetica, sans-serif; } h1 { font-size: 16px; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; } body, td, p, input { font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; color: #333333; } .navlinks { font-size: 14px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; color: #FFFFFF; } .style6 { font-size: 12px; color: #000000; font-weight: bold; } .style7 { font-size: 12px; font-weight: bold; } .style10 {color: #000000} a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } .style11 {color: #000000; font-size: 12px;} .style12 {font-weight: bold} .style13 { font-size: 12px; color: #000000; background-color: #D6D6D6; height: 22px; width: 72px; outline: 1; border: 1; font-weight: normal; } .style15 {font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; } --> </style> <script type="text/javascript"> function calculate() { var total = (parseInt(document.getElementById("cam").value) + parseInt(document.getElementById("final_exam").value)) / 2; if (total >100) { alert('Total cannot be more than 100.!!'); } else if (total<0) { alert('Total cannot be negative.!!'); } else { document.getElementById("total").value = total; var grade; if (total>=80) { grade = 'A'; } else if(total>=70) { grade = 'B'; } else if(total>=60) { grade = 'C'; } else if(total>=50) { grade = 'D'; } else if(total>=40) { grade = 'E'; } else { grade = 'F'; } document.getElementById("grade").value = grade; } } </script> <script src="../../../Scripts/AC_RunActiveContent.js" type="text/javascript"></script> </head> <body style="margin:0; background-color: #E4E7E6;" <?php if($saved){echo 'onload="alert(\'Records successfully saved.\');"';}?>> <table width=1097 height="100%" border=1 align="center" cellpadding=0 cellspacing=0> <tr align="center" valign="middle"> <td height="34" colspan="2" class="style11">You are here>><a href="main.php">Main Menu</a> >>Examination>>Insert Result </td> </tr> <tr> <td width="202" height = "90%"valign="top"><div align="center" class="style6"> <p class="style30">ASSALAMUALAIKUM</p> </div> <div align="center" class="style7"> EXAMINATION</div> <ul> <li><span> <a href="exm.php">Insert Result </a></span> </li> </ul> <p><span class="style7"><a href="<?php echo $logoutAction ?>">>>LOGOUT</a></span> </p> <p align="center" class="style7">Date: <?php echo date('d-m-Y') ."\n";?></p></td> <td width="889" valign="top" style="padding-left:20px; padding-top:25px; padding-right:40px; padding-bottom:35px; "><p> <form id="form2" name="form2" method="post" action=""> <p align="center" class="style12 style28 style29"><strong>LIST REGISTERED SUBJECTS</strong></p> <p align="center" class="style12"> </p> <blockquote> <blockquote> <blockquote> <blockquote> <p> </p> <table width="601" height="138" border="0"> <tr> <td height="26">Session</td> <td><div align="center">:</div></td> <td><input name="sessi" type="text" id="sessi" value="<?php echo $row_test['sessi']; ?>" size="10" readonly="true" /></td> </tr> <tr> <td height="26">Year</td> <td><div align="center">:</div></td> <td><input name="year" type="text" id="year" value="<?php echo $row_test['year']; ?>" size="10" readonly="true" /></td> </tr> <tr> <td width="92" height="26"><div align="left">Group</div></td> <td width="10"><div align="center">:</div></td> <td width="360"><input name="group" type="text" id="group" value="<?php echo $row_test['group']; ?>" size="10" readonly="true" /></td> </tr> <tr> <td height="22">Subject Code</td> <td><div align="center">:</div></td> <td><input name="s_code" type="text" id="s_code" value="<?php echo $row_test['s_code']; ?>" size="10" readonly="true" /></td> </tr> <tr> <td height="23">Title</td> <td><div align="center">:</div></td> <td><input name="s_title" type="text" id="s_title" size="80" value="<?php echo $row_Recordset2['s_title']; ?>" readonly="true" /></td> </tr> </table> </blockquote> </blockquote> </blockquote> </blockquote> <p> </p> <table width="609" height="54" border="0" align="center"> <tr> <td width="60" height="28" scope="col"><span class="style15">Matric No.</span></td> <td width="48" scope="col"><span class="style15">CAM</span></td> <td width="48" scope="col"><div align="left" class="style15"> <div align="center">Final Exam</div> </div> </td> <td width="48" scope="col"><div align="left" class="style15"> <div align="center">Total Score</div> </div></td> <td width="383" scope="col"><span class="style15">Grade</span></td> </tr> <?php do { ?> <tr> <td height="20" scope="col"><input name="matric_no[]" type="text" id="matric_no[]" value="<?php echo $row_test['matric_no']; ?>" size="10" readonly="true" /></td> <td scope="col"><input name="cam" type="int" id="cam" size="8" /></td> <td scope="col" ><input name="final_exam" type="int" id="final_exam" size="8" /></td> <td scope="col"><input name="total" type="int" id="total" size="8" onClick="calculate()"/></td> <td scope="col"><input name="grade" type="text" id="grade" size="8" onClick="gred()"/></td> </tr> <?php } while ($row_test = mysql_fetch_assoc($test)); ?> </table> <p align="center"> </p> <table width="200" border="0" align="center"> <tr> <th scope="col"><input name="save" type="submit" class="style13" id="save" value="Save" /></th> <th scope="col"><script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0','width','77','height','22','src','exmtry','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','bgcolor','#E4E7E6','scale','noborder','movie','exmtry' ); //end AC code </script> <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="77" height="22"> <param name="movie" value="exmtry.swf"> <param name="quality" value="high"> <param name="bgcolor" value="#E4E7E6"> <param name="SCALE" value="noborder"> <embed src="exmtry.swf" width="77" height="22" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#E4E7E6" scale="noborder"></embed> </object> </noscript></th> </tr> </table> <div align="center"></div> <p align="center"> </p> <p> </p> <p align="center" class="style8"> </p> </form> </td> </tr> <tr> <td height="58" colspan="2"><table width="100%" height="39" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" class="basestyle"><span class="style31 style10">© Copyright . All Rights Reserved. <a href="http://www.myfreetemplates.com" class="basestyle"></a></span></td> </tr> </table></td> </tr> </table> </body> <?php mysql_free_result($test); ?> </html>
  5. <script type="text/javascript"> function calculate() var cams = document.getElementByName("cam"); var finals = document.getElementByName("final_exam"); var total = 0; for (i = 0; i < cams.length; i++) { var total = parseInt(cams[i].value) + parseInt(finals[i].value); } document.getElementByName("total").value = total; </script> i had this code for insert many marks but don't work... can anyone help me
  6. i had tried insert the missing one but still came out with error
  7. Parse error: syntax error, unexpected $end in C:\AppServ\www\mas\aug18\aug18\mas\examtry.php on line 377
  8. not working... hurm never mind.. by the way thanks for your help
  9. <script type="text/javascript"> function calculate() { var total = (parseInt(document.getElementById("cam").value) + parseInt(document.getElementById("final_exam").value)) / 2; document.getElementById("total").value = total; } </script> this is my php code: there is do that's mean there is a a lot of data to be calculate <?php do { ?> <tr> <td height="20" scope="col"><input name="matric_no[]" type="text" id="matric_no[]" value="<?php echo $row_test['matric_no']; ?>" size="10" readonly="true" /></td> <td scope="col"><input name="cam" type="int" id="cam" size="8" /></td> <td scope="col" ><input name="final_exam" type="int" id="final_exam" size="8" /></td> <td scope="col"><input name="total" type="int" id="total" size="8" onClick="calculate()" readonly="true"/></td> <td scope="col"><input name="grade" type="text" id="grade" size="8" onClick="gred()" readonly="true"/></td> </tr> <?php } while ($row_test = mysql_fetch_assoc($test)); ?>
  10. <script type="text/javascript"> function calculate() { var total = (parseInt(document.getElementById("cam").value) + parseInt(document.getElementById("final_exam").value)) / 2; document.getElementById("total").value = total; } </script> i got this code..it's work but it work if only there is one data.... what if my data had many to calculate?? i'm so stuck.. i made my form using php also... so it's has repeat region because all my data are retrive from the database..just the calculation insert manually from admin and the total is auto appear..
  11. hello sir, how i want to make a function that can calculate any number that i insert?? very very newbie in javascript...
  12. those two number i have to insert myself then the total of those two number will automatic itself appear.. without using any button...
  13. sory sir...i'm new to this calculation... if there any link so that i can learn step by step about how to calculate, i'm so thankful
  14. dear sir, how can i make calculation then the total will appear automatically in the textfield??? for example: textfield 1 + textfield 2 divide 2 = textfield total... please help me
  15. girlzz

    filter

    sir, i just had this coding for filter... i'm want to filter s_code and group from medic_registered_course... can you give me more detail want you want to see?
  16. girlzz

    filter

    $colname_mass = "-1"; if (isset($_GET['s_code'])) { $colname_mass = $_GET['s_code']; } mysql_select_db($database_mas, $mas); $query_mass = sprintf("SELECT * FROM medic_registered_course WHERE s_code = %s", GetSQLValueString($colname_mass, "text")); $mass = mysql_query($query_mass, $mas) or die(mysql_error()); $row_mass = mysql_fetch_assoc($mass); $totalRows_mass = mysql_num_rows($mass);
  17. girlzz

    filter

    hello sir.. can help me please..how to filter 2 data in one search??? i want to make searching according to s_code and group... the s_code work but the group not be filter... can anybody help me...??
  18. <form name="form1" method="post" action="" > <table width="500" border="1"> <tr> <td height="33" colspan="4"><div align="center" class="style24">Medic Assessment System</div></td> </tr> <tr> <td height="26" colspan="4"><div align="center" class="style25"> Group Registration</div></td> </tr> <tr> <td width="99" class="style1"><div align="right" class="style3 style19"><strong>Year </strong>:</div></td> <td width="128" class="style1"> <div align="left"> <select name="year" id="year" onChange="MM_jumpMenu('parent',this,0)"> <option value="#">Please select</option> <option value="?value=1 block 1&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='1 block 1'){echo"selected=\"selected\"";} ?>>1 block 1</option> <option value="?value=1 block 2&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='1 block 2'){echo"selected=\"selected\"";} ?>>1 block 2</option> <option value="?value=1 block 3&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='1 block 3'){echo"selected=\"selected\"";} ?>>1 block 3</option> <option value="?value=1 block 4&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='1 block 4'){echo"selected=\"selected\"";} ?>>1 block 4</option> <option value=" "> </option> <option value="?value=2 block 1&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='2 block 1'){echo"selected=\"selected\"";} ?>>2 block 1</option> <option value="?value=2 block 2&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='2 block 2'){echo"selected=\"selected\"";} ?>>2 block 2</option> <option value="?value=2 block 3&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='2 block 3'){echo"selected=\"selected\"";} ?>>2 block 3</option> <option value="?value=2 block 4&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='2 block 4'){echo"selected=\"selected\"";} ?>>2 block 4</option> <option value=" "> </option> <option value="?value=3 block 1&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='3 block 1'){echo"selected=\"selected\"";} ?>>3 block 1</option> <option value="?value=3 block 2&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='3 block 2'){echo"selected=\"selected\"";} ?>>3 block 2</option> <option value="?value=3 block 3&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='3 block 3'){echo"selected=\"selected\"";} ?>>3 block 3</option> <option value="?value=3 block 4&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='3 block 4'){echo"selected=\"selected\"";} ?>>3 block 4</option> <option value=" "> </option> <option value="?value=4 block 1&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='4 block 1'){echo"selected=\"selected\"";} ?>>4 block 1</option> <option value="?value=4 block 2&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='4 block 2'){echo"selected=\"selected\"";} ?>>4 block 2</option> <option value="?value=4 block 3&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='4 block 3'){echo"selected=\"selected\"";} ?>>4 block 3</option> <option value="?value=4 block 4&group=<? echo $_GET['group'] ?>" <?php if($_GET['value']=='4 block 4'){echo"selected=\"selected\"";} ?>>4 block 4</option> </select> </div></td> <td width="89" class="style1"><div align="right" class="style3"><span class="style27">Session </span>:</div></td> <td width="156" class="style1"><div align="left" class="style3"> <label> <input name="sessi" type="text" id="sessi" size="15" maxlength="15" value="2007/2008"/> </label> </div></td> </tr> <tr> <td class="style1"><div align="right" class="style3"><span class="style27">PBL Group</span> :</div></td> <td class="style1"><div align="left" class="style3"> <label> <select name="group" size="1" id="group" onChange="MM_jumpMenu('parent',this,0)"> <option value="#">Please select</option> <option value="?value=<? echo $_GET['value']?>&group=1" <?php if($_GET['group']=='1'){echo "selected=\"selected\"";} ?>>1</option> <option value="?value=<? echo $_GET['value']?>&group=2" <?php if($_GET['group']=='2'){echo "selected=\"selected\"";} ?>>2</option> <option value="?value=<? echo $_GET['value']?>&group=3" <?php if($_GET['group']=='3'){echo "selected=\"selected\"";} ?>>3</option> <option value="?value=<? echo $_GET['value']?>&group=4" <?php if($_GET['group']=='4'){echo "selected=\"selected\"";} ?>>4</option> <option value="?value=<? echo $_GET['value']?>&group=5" <?php if($_GET['group']=='5'){echo "selected=\"selected\"";} ?>>5</option> <option value="?value=<? echo $_GET['value']?>&group=6" <?php if($_GET['group']=='6'){echo "selected=\"selected\"";} ?>>6</option> <option value="?value=<? echo $_GET['value']?>&group=7" <?php if($_GET['group']=='7'){echo "selected=\"selected\"";} ?>>7</option> <option value="?value=<? echo $_GET['value']?>&group=8" <?php if($_GET['group']=='8'){echo "selected=\"selected\"";} ?>>8</option> <option value="?value=<? echo $_GET['value']?>&group=9" <?php if($_GET['group']=='9'){echo "selected=\"selected\"";} ?>>9</option> <option value="?value=<? echo $_GET['value']?>&group=10" <?php if($_GET['group']=='10'){echo "selected=\"selected\"";} ?>>10</option> <option value="?value=<? echo $_GET['value']?>&group=11" <?php if($_GET['group']=='11'){echo "selected=\"selected\"";} ?>>11</option> <option value="?value=<? echo $_GET['value']?>&group=12" <?php if($_GET['group']=='12'){echo "selected=\"selected\"";} ?>>12</option> </select> </label> </div></td> <td class="style1"><div align="right"><span class="style3"></span></div></td> <td class="style1"><div align="left"><span class="style3"></span></div></td> </tr> </table> <p> </p> <table width="416" height="70" border="1"> <tr> <td width="87" height="33"><strong>Matric No</strong> </td> <td width="7"><div align="center">:</div></td> <td width="300"><input name="matric" type="text" class="style28" id="matric" value="<?php echo $row_viewer['matric_no']; ?>" size="15" maxlength="15" /></td> </tr> <tr> <td height="29" bgcolor="#FFFFFF"><strong>Name</strong></td> <td><div align="center">:</div></td> <td><input name="name" type="text" class="style28" id="name" value="<?php echo $row_viewer['name']; ?>" size="50" maxlength="50"/></td> </tr> </table> <blockquote> <blockquote> <p align="center"><input name="saved" type="submit" class="style28" id="saved" value="Save" /> <input name="reset" type="reset" class="style28" id="reset" value="Reset" /> </p> <p align="left"> <input type="hidden" name="MM_insert" value="form1" /> </p> </blockquote> </blockquote> </form> <form name="form2" method="post" action=""> <table width="765" height="60" border="1" bordercolor="#000000"> <tr> <td width="100" height="28" class="style3"><div align="center" class="style28"><strong>Matric_No</strong></div></td> <td width="288" class="style3"><div align="center" class="style28"><strong>Name</strong></div></td> <td width="59" class="style3"><div align="center" class="style28"><strong>Sessi</strong></div></td> <td width="57" class="style3"><div align="center" class="style28"><strong>Year</strong></div></td> <td width="64" class="style3"><div align="center" class="style28"><strong>Group</strong></div></td> <td width="76" class="style3"><div align="center" class="style28"><strong> Status </strong></div></td> <td width="75" class="style3"><div align="center" class="style28"><strong>Delete</strong></div></td> </tr> <?php do { ?> <tr> <td height="24" class="style3 style2 style4"><div align="left" class="style28"><?php echo $row_all['matric_no']; ?></div></td> <td class="style3 style2 style4"><div align="left" class="style28"><?php echo $row_all['name']; ?></div></td> <td class="style3 style2 style4"><div align="center" class="style28"><?php echo $row_all['sessi']; ?></div></td> <td class="style3 style2 style4"><div align="center" class="style28"><?php echo $row_all['year']; ?></div></td> <td class="style3 style2 style4"><div align="center" class="style28"><?php echo $row_all['group']; ?></div></td> <td class="style3 style2 style4"><div align="center" class="style28"><?php echo $row_all['status']; ?></div> <td class="style3 style2 style4"><div align="center"> <input name="del_id[]" type="checkbox" class="style28" value="<?php echo $row_all['matric_no']; ?>" /> <input type = "hidden" name ="cek " value = "<?php echo $row_all['matric_no'];?>" /> </div></td> <?php } while ($row_all = mysql_fetch_assoc($all)); ?></table> <input name="button" type="submit" class="style28" id="button" onClick="return confirm('Are you sure you wish to delete the selected rows?')" value="Delete" /> <input type="hidden" name="value" id="value" value="<? echo $_GET['value'] ?>" /> <input type="hidden" name="group" id="group" value="<? echo $_GET['group'] ?>" /> </form></td> </tr> <tr> <td height="7" valign="bottom" bgcolor="#0099FF"><div align="center"><span class="style6">INDIVIDUAL</span></div></td> </tr> <tr> <td height="16" valign="bottom" bgcolor="#00CCFF"><ul><li><a href="block_reg_try.php">Block Register</a> </li> <li><a href="report_main.php">Reports</a></li> <li>View Data <ul> <li>Class List <ul> <li>By All <ul> <li><a href="class_list.php">Class List</a></li> </ul> </li> <li>By Group <ul> <li><a href="q_class_list.php">q Class List</a></li> </ul> </li> </ul> </li> <li><a href="query_matric.php">By Matrix No</a></li> <li><a href="query_year.php">By Year</a></li> <li><a href="grop.php">By Group</a></li> <li><a href="query_all.php">By All</a> </li> </ul> </li> </ul></td> </tr> <tr> <td height="14" valign="bottom" bgcolor="#0099FF"><div align="center"><span class="style7">PBL GROUP </span></div></td> </tr> <tr> <td height="35" valign="bottom" bgcolor="#00CCFF"><ul> <li>Registration </li> <li>Lecturer List </li> </ul></td> </tr> <tr> <td height="16" valign="bottom" bgcolor="#0099FF"><span class="style7"><a href="login.php">>>LOGOUT</a></span></td> </tr> <tr> <td height="144" valign="bottom" bgcolor="#00CCFF"><p align="center" class="style7">Date: <?php echo date('Y-m-d') ."\n";?></p> </td> </tr> <tr> <td height="58" colspan="2"><table width="100%" height="39" border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center" bgcolor="#00CCFF" class="basestyle">© Copyright . All Rights Reserved. <a href="http://www.myfreetemplates.com" class="basestyle"></a></td> </tr> </table></td> </tr> </table> </body> </html> <?php if ((isset($_POST["name"])) && ($_POST["name"] == "")) { mysql_free_result($viewer); mysql_free_result($all); } ?>
  19. hello sir... can anybody help me?? i make form that has 3 buttons..submit,reset and delete.... my problem is.. my reset button doesn't work.. why?? but if i enter delete button the whole page will be return to default... how to make my reset button return to default not the delete button..anyone can help me please...?? :'( :'( <input name="saved" type="submit" class="style28" id="saved" value="Save" /> <input name="reset" type="reset" class="style28" id="reset" value="Reset" /> <input name="button" type="submit" class="style28" id="button" onClick="return confirm('Are you sure you wish to delete the selected rows?')" value="Delete" />
  20. where can i learn about using ajax to make two drop down list to retrive data from database??
  21. hello sir... i have 1 question to ask... how can i get 1 table form database so that when i query by search so all the information appear.. coz i had one table called title from medic_subject_offered.. i want the title appear same as code..example: key in code, the display the code and the title... this is my coding... can u explain is there anythiing wrong?? <?php $colname_Recordset1 = "-1"; if (isset($_GET['code'])) { $colname_Recordset1 = (get_magic_quotes_gpc()) ? $_GET['code'] : addslashes($_GET['code']); } mysql_select_db($database_mas, $mas); $query_Recordset1 = sprintf("SELECT medic_registered_course.matric_no, medic_registered_course.s_code FROM medic_registered_course WHERE medic_registered_course.s_code LIKE '%%%s%%' ORDER BY `id` DESC" , $colname_Recordset1); $Recordset1 = mysql_query($query_Recordset1, $mas) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_select_db($database_mas, $mas); $query_Recordset2 = "SELECT medic_subject_offered.s_title,medic_registered_course.s_code FROM medic_registered_course,medic_subject_offered WHERE medic_registered_course.s_code=medic_subject_offered.s_code"; $Recordset2 = mysql_query($query_Recordset2, $mas) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2); ?>
  22. hello sir... i have one question... how can i get one field from table in my database so when i search by s_code, the s_title from another table can be same value as the s_code?? here is my coding.. mysql_select_db($database_mas, $mas); $query_Recordset1 = sprintf("SELECT medic_registered_course.matric_no, medic_registered_course.s_code FROM medic_registered_course WHERE medic_registered_course.s_code LIKE '%%%s%%' ORDER BY `id` DESC" , $colname_Recordset1); $Recordset1 = mysql_query($query_Recordset1, $mas) or die(mysql_error()); $row_Recordset1 = mysql_fetch_assoc($Recordset1); $totalRows_Recordset1 = mysql_num_rows($Recordset1); mysql_select_db($database_mas, $mas); $query_Recordset2 = "SELECT medic_subject_offered.s_title,medic_registered_course.s_code FROM medic_registered_course,medic_subject_offered WHERE medic_registered_course.s_code=medic_subject_offered.s_code"; $Recordset2 = mysql_query($query_Recordset2, $mas) or die(mysql_error()); $row_Recordset2 = mysql_fetch_assoc($Recordset2); $totalRows_Recordset2 = mysql_num_rows($Recordset2);
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.