Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Other Programming › Web Languages › [Help] Login System

[Help] Login System

Posts 1–2 of 2 · Page 1 of 1
omanel
omanel
[Help] Login System
I am building a simple login system, most of the code here is from a toturial I found online, why do I get the incorrect password error??(Password is correct!)
The password Is not encrypted!


Code:
 <?php
 
$Lname = $_POST['Lname'];
$Lpass = $_POST['Lpass'];

 // Connects to your Database 

 mysql_connect("localhost", "root", "") or die(mysql_error()); 

 mysql_select_db("Acc") or die(mysql_error()); 

 // makes sure they filled it in

 	if(!$Lname | ! $Lpass) {

 		die('You did not fill in a required field.');

 	}

 	$check = mysql_query("SELECT * FROM users WHERE username = '".$_POST['Lname']."'")or die(mysql_error());
	$checkpass = mysql_query("SELECT * FROM users WHERE password = '".$_POST['Lpass']."'")or die(mysql_error());

 //Gives error if user dosen't exist

 $check2 = mysql_num_rows($check);

 if ($check2 == 0) {

 		die('That user does not exist in our database. <a href=register.htm>Click Here to Register</a>');

 				}


 //gives error if the password is wrong

 	if ($checkpass == $Lpass) 
	
echo "<h1><b>$Lname</b>, you are logged in!</h1> <br /> <a href='/forum/www.google.com'>link</a>";

else 

die('Incorrect password, please try again.');
 

 ?>
I'd appreciate your help.
#1 · 15y ago
NextGen1
NextGen1
Check your password, check your database.

die('Incorrect password, please try again.'); only triggers if password is wrong, code seems fine, so Check the password and database, because somewhere along the line, there is a issue with either.

Only real reason.

Follow this
PHP Login Script

To the letter, and check your password again.
#2 · 15y ago
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Tags for this Thread

None