Please guys i need help in log in form, i'm newbie at php and tomorrow is the submission of our case study. can somebody help me in log in form. i'll post a code below and tell me if this is correct, if no please provide the right answer, and i'll do the rest.
My database is MySQL Workbench
<?php
include ("connectDB.php");
$idnum = $_POST["IDnum"];
$password_Field = $_POST["Passtxt"];
$insertSql = "SELECT * FROM studenttbl WHERE StudentID = '". $_POST["IDnum"] ."'";
//$insertSql .= " VALUES('$stud_First_Name','$stud_Last_Name', '$Password_Field')";
$result = $mysqli->query($insertSql);
if(query_num_rows($insertSql)==1) {
echo "record found successfully.";
} else {
echo "inserting a record was unsuccessful.";
echo $insertSql;
}
?>
Thank you in advance.