First of all I would like to accept my fault for loading the tables with many columns. I plan to separate it after I solve this issue. I wrote the code Admin_Edit_Info.php as shown below but I failed to update the data. I've been figuring these out for few days. Considering the codes are not that complicated, I really thought that this would be easy but I got a problem in updating the table.
$query = "UPDATE student_information SET first_name='$first_name',last_name='$last_name',";
$query .= "gender='$gender',date_of_birth='$date_of_birth',contact_no='$contact_no',grade='$grade',section='$section',";
$query .= "LRN='$LRN',email1='$email1',email2='$email2',address='$address',description='$description',";
$query .= "Fil1='$Fil1',Fil2='$Fil2',Fil3='$Fil3',Fil4='$Fil4',Eng1='$Eng1',Eng2='$Eng2',Eng3='$Eng3',Eng4='$Eng4',";
$query .= "Mat1='$Mat1',Mat2='$Mat2',Mat3='$Mat3',Mat4='$Mat4',Sci1='$Sci1',Sci2='$Sci2',Sci3='$Sci3',Sci4='$Sci4',";
$query .= "Ap1='$Ap1',Ap2='$Ap2',Ap3='$Ap3',Ap4='$Ap4',Tle1='$Tle1',Tle2='$Tle2',Tle3='$Tle3',Tle4='$Tle4',";
$query .= "Mus1='$Mus1',Mus2='$Mus2',Mus3='$Mus3',Mus4='$Mus4',Art1='$Art1',Art2='$Art2',Art3='$Art3',Art4='$Art4',";
$query .= "Pe1='$Pe1',Pe2='$Pe2',Pe3='$Pe3',Pe4='$Pe4',H1='$H1',H2='$H2',H3='$H3',H4='$H4',Esp1='$Esp1',Esp2='$Esp2',Esp3='$Esp3',Esp4='$Esp4'";
$query .= " WHERE student_id='$student_id'";
$result = mysqli_query($query, $link_id);
if(mysqli_error() != null){
$recordUpdated = true;
}
else
{
$recordUpdated = false;
}
header("location:Admin_Home.php?flag=$flag&student_id=$student_id&status=1");
?>
I am maybe you also need the configuration so I am including it here.
Connection.php
<?php
$host = "localhost";
$dbusername = "root";
$dbpassword = "765632";
$dbname = "student";
$link_id = mysqli_connect($host,$dbusername,$dbpassword,$dbname) or die("Error " . mysqli_error($link_id));
?>
Just in case I have a mismatch in my configuration.