PHP Sessions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

PHP Sessions

How do I send a reply to a user who fails to login using sessions. something like "Password is incorrect ". Using *sessions. not javascript validation.

19th Jun 2018, 10:33 AM
Junior Joseph
Junior Joseph - avatar
1 Answer
+ 2
$_SESSION['user']=$username; if($_SESSION['user'] == $username){ header('Location: profile.php'); } else{ echo "user not found"; }
19th Jun 2018, 12:04 PM
Sudarshan Rai
Sudarshan Rai - avatar