I have two pages . In the first page if user will click on button then he will get relavant data with id column
<form action='edit.php?id=$id' method='post' name='edit_btn'>
<button type='submit' class='w3-btn w3-red w3-round-xlarge'>Proceed </button>
</form>
$con=mysqli_connect("localhost","root","","student_result_info_db");if (mysqli_connect_errno()){ echo "Failed to connect to MySQL: " . mysqli_connect_error(); }else{
if(isset($_GET['edit_btn'])){
echo "<div class='w3-container w3-red'> <h1>>Error Found!</h1> <h4>OK You Did Hit The EDIT Button</h4> </div> <br/>";
}else{
$get_selected_id = $_GET['id'];
echo $get_selected_id;
$res = "SELECT * FROM school_result";
while ($row = mysql_fetch_array($res)){
echo "$row[id]. $row[first_name] <br/>";
echo "$row[id]. $row[last_name] <br/>";
}
}
}
It'showing following error
Fatal error: Call to undefined function mysql_fetch_array() in