0
I have a login, and if the credentials are correct it opens another PHP file and wanted the name of the person associated with the credentials used in the login to appear on a label. All the information is stored in a comic book. How do I access the values stored in the first PHP file?
The login code is:
$email = mysqli_real_escape_string($dbconn, $_POST['login']);
$password = mysqli_real_escape_string($dbconn, $_POST['senha']);
if (!empty($email) && !empty($password))
{
$query = "SELECT email, password, id_paciente FROM Paciente WHERE email = '$email' AND password = '$password'";
$data = mysqli_query($dbconn, $query);
$result = mysqli_num_rows($data);
if ($result == 1)
{
$row = mysqli_fetch_array($data);
$_SESSION['id_paciente'] = $row['id_paciente'];
$_SESSION['nome'] = $row['nome'];
header("location: paciente_marcar_consulta_online.php");
}
And I wanted to pass the id_patient to the file "patiente_marcar_consult_online.php" where I would then present the name of this id_patient. Can you help me?
Related https://answall.com/q/49521/101, https://answall.com/q/102652/101
– Maniero