-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
GitHub abused to host malware and create download links seemingly affiliated with Microsoft
By Martin Hodás,
- 4 replies
- 1 view
-
Can't close Facebook chat windows in a desktop browser? Here is a simple workaround
By Martin Hodás,
- 2 replies
- 7 views
-
KB5028166 is causing system issues, break Secure Channel, forces Synology to release a patch
By Qblade_,
- microsoft
- windows 10
- (and 7 more)
- 6 replies
- 4 views
-
Latest Microsoft Launcher update breaks the app for many, including Surface Duo users
By Qblade_,
- microsoft
- microsoft launcher
- (and 3 more)
- 12 replies
- 4 views
-
Windows 10 KB5027215 update is causing installation issues for some users
By Qblade_,
- microsoft
- windows 10
- (and 6 more)
- 0 replies
- 5 views
-
Question
lutherfchen
Hi, I'm creating a forum with Text File login system and I have all the datas saved like this:
[data]
Pass = asd
Email = asd@asd
...
[end]
So in my PHP code I did this:
$userlist = file("$username.ini");
$checkline = $userlist[1]; //as I need to check the password so this means line 2
$checkpass = explode(" ", $checkline);
if(strcmp($password, $checkpass[2]) == 0) //$checkpass[2] means the asd part
{
echo "Welcome back $username";
}
else
{
echo "Incorrect Password";
}
So when I type asd in the field it shows me Incorrect Password.
But when I changed the $checkpass[2] to $checkpass[0] //$checkpass[0] means the Password part
and I type Password in the field its works perfectly..
I want to ask if there is something wrong? or explode does not work with the las word?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts