Good day I'm working on WampServer php and mysql with sessions I have a problem having many users I want when I log in to show the data only of that user, my problem is how to assign an id so that when I start open with data only of that user. I have two tables User and this is related to the field user id to the table students I want to be the same page for all student users and only change the information to be displayed, I understand that with SQL JOIN but I have never used it.
$alumnos = mysql_query(“SELECT * FROM alumnos WHERE alumno = ‘$usuario’ AND password = ‘$password'”);
if(mysql_num_rows($alumno) > 0)
{
session_start();
$_SESSION[‘alumno’]=”$usuario”, $id;
header(“Location: alumnos/espacioalumno.php”);
exit();
}