facultyname is showing a value but
fid is not getting value. I want to assign value of
fid to a variable.
$facultyname=$_POST['facultyname']; echo $facultyname; $query="SELECT fid FROM faculty WHERE fname='$facultyname'"; $fid_result=mysqli_query ($link,$query); $finfo = mysqli_fetch_field($fid_result); printf("FacultyID :- %d ",$finfo->fid);