<?php
	$query = "SELECT * FROM student_info WHERE st_id='$user'";
	$subject_set = mysqli_query($connection,$query);
	$row = mysqli_fetch_array($subject_set);

	$surname = $row['surname'];
	$first_name = $row['first_name'];
	$dob = $row['dob'];
	$gender = $row['gender'];
	$citizenship = $row['citizenship'];
	$id_no = $row['id_no'];
	$home_language = $row['home_language'];
	$disabled = $row['disabled'];
	$disability = $row['disability'];
	$cellno = $row['cellno'];
	$email = $row['email'];
	$postal_address = $row['postal_address'];
	$physical_address = $row['physical_address'];
	$know_about_us = $row['know_about_us'];
	$recieve_info_by = $row['recieve_info_by'];
	$share_your_details = $row['share_your_details'];
	
	
	$g_surname = $row['g_surname'];
	$g_names = $row['g_names'];
	$g_relationship = $row['g_relationship'];
	$g_cellno = $row['g_cellno'];
	
	if(!$row)
	{
		header('Location:profile.php?fill=1');
	}
	else
	{
		if($surname == '' || $first_name=='' || $dob=='' || $gender=='' || $citizenship =='' 
			|| $id_no=='' || $home_language=='' || $disabled=='' || $cellno=='' || $email=='' || $postal_address=='' || $physical_address==''
			|| $know_about_us=='' || $recieve_info_by=='' || $share_your_details=='')
		{
			header('Location:profile.php?fill=2');
		}
		else if($g_surname == '' || $g_names=='' || $g_relationship=='' || $g_cellno=='')
		{
			header('Location:gurdian.php?fill=1');
		}
	}
?>