OK, my PHP skills are progressing but here is a problem I cannot solve:
if ($studentid) {
$verifyStudent = mysql_db_query ($dbname, "SELECT StudentID from Students", $linktodb);
if (in_array ($studentid, mysql_fetch_array ($verifyStudent))) {
$showName = implode("", mysql_fetch_array (mysql_db_query ($dbname, "SELECT StudentName from Students where (StudentID='$studentid')", $linktodb)));
print "$showName";
} else {
print "Student name not found!";
}
}
The value of $showName is JohnJohn instead of John. I checked the database and the value in StudentName is just John. Why does it out put the name twice?