i wanted to check either the user is signed in or not before doing registration. here is my code in below
if (isset($_SESSION['Username'])){
$query_ins="insert into scholarship values('$firstname','$lastname','$username','$idnumber','$gender','$dateofbirth','$number','$email','$class','$schoolname','$fund','$reason')";
$query3=mysqli_query($con,$query_ins);
echo '<script type="text/javascript"> alert("Form is filled we will contact you soon") </script>';
}
else{
echo '<script type="text/javascript"> alert("You need to login first") </script>';
}
}