M
mark neil l
Guest
this my database
Id_number Course_Code Description Grade
06-01000 aaaa a 75
06-01000 bbbb b 76
06-01000 cccc c 77
06-02000 aaaa a 85
06-02000 bbbb b 86
06-02000 cccc c 87
this is my codes to display the records
<?php
$search = $_GET[id_num];
mysql_connect("abc", "def", "ghi") or die(mysql_error());
mysql_select_db("grade_inquiry") or die(mysql_error());
$result = mysql_query("SELECT * FROM tblstudent_grade WHERE Id_number='$search'") or die(mysql_error());
while($row = mysql_fetch_array( $result )){
echo "<tr><td>"$row['Course_Code'];
echo "</td><td>"$row['Description'];
echo "</td><td><div align='center'><input id='gra' name='gra' value='$row1[Grade]' maxlength='3' size='3' style='text-align:center'/>";
echo "</div></td></tr>";
}
?>
if $search is equal to 06-01000
i used while($row = mysql_fetch_array( $result )){
to display the records
this is the output
aaaa a 75
bbbb b 76
cccc c 77
i want to udate the grade every time i changed the value of the grade of the students..., please help me
thx
Id_number Course_Code Description Grade
06-01000 aaaa a 75
06-01000 bbbb b 76
06-01000 cccc c 77
06-02000 aaaa a 85
06-02000 bbbb b 86
06-02000 cccc c 87
this is my codes to display the records
<?php
$search = $_GET[id_num];
mysql_connect("abc", "def", "ghi") or die(mysql_error());
mysql_select_db("grade_inquiry") or die(mysql_error());
$result = mysql_query("SELECT * FROM tblstudent_grade WHERE Id_number='$search'") or die(mysql_error());
while($row = mysql_fetch_array( $result )){
echo "<tr><td>"$row['Course_Code'];
echo "</td><td>"$row['Description'];
echo "</td><td><div align='center'><input id='gra' name='gra' value='$row1[Grade]' maxlength='3' size='3' style='text-align:center'/>";
echo "</div></td></tr>";
}
?>
if $search is equal to 06-01000
i used while($row = mysql_fetch_array( $result )){
to display the records
this is the output
aaaa a 75
bbbb b 76
cccc c 77
i want to udate the grade every time i changed the value of the grade of the students..., please help me
thx