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 › PHP Programming › New in PHP

New in PHP

Posts 1–7 of 7 · Page 1 of 1
DO
DoomedBlocks
New in PHP
I'm new to PHP and I need to fix the php files hat were given to me,I keep getting errors on this one saying line 12 has an error.Hope you can teach me guys

For example:

<?php
if($_SERVER['REQUEST_METHOD'] == 'GET')
{
if(isset($_GET['email']) && isset($_GET['password']) && ($_GET['password'])!='' && $_GET['email']!='')
{
require_once 'connect.php';
$em = $_GET['email'];
$pw = $_GET['password'];
$sql = "SELECT * FROM user_accounts a, user_info ui WHERE email='$em' and password='$pw' and a.userid=ui.userid";
$result = mysqli_query($conn, $sql);

if(mysqli_num_rows($result) != 0){
$row = mysqli_fetch_row($result);
session_start();
echo 'Authorized';
$_SESSION['Authorized'] = 'Granted';
$_SESSION['fullname'] = $row[7]. " " . $row[6];
} else{
echo "Invalid email or password.";
}
mysqli_close ($conn);
}else{
echo "Please fill all fields.";
}
} else{
echo "Access not authorized, access denied.";
}
?>

/PS im also new in posting threads sry
#1 · 9y ago
Silent
[MPGH]Silent
Quote Originally Posted by DoomedBlocks View Post
if(mysqli_num_rows($result) != 0){
should be
Code:
if($result->num_rows != 0){ ...
I believe.
#2 · 9y ago
daymbot
daymbot
Well, what's the error message?

You should try to check the return of your mysqli_query function (returns false in case of error)
You can also try to print your result with this code snippet for example, to see if the result is what you expect

echo '<pre>';
print_r($result);
echo '</pre>';
#3 · 9y ago
DO
DoomedBlocks
The error is Fatal error:Can't Use function return value in write context in (directory).

I would try both of your suggestions


/PS can u guys help me in my project? cuz i need a LOT of help. ty ty
#4 · edited 9y ago · 9y ago
ende124
ende124
Not an answer to your problem, but I'd suggest you asking on Stack Overflow or similar. There's a shitton of users willing to help.
Also, put your code in code blocks, make it look nicer. And please say what error you get, or else it can be hard helping you.
#5 · 9y ago
Smirnoffq
Smirnoffq
Quote Originally Posted by DoomedBlocks View Post
The error is Fatal error:Can't Use function return value in write context in (directory).

I would try both of your suggestions


/PS can u guys help me in my project? cuz i need a LOT of help. ty ty
I can try helping, add me on skype: Smirnoffq (or click in skype logo in my signature)
#6 · 9y ago
HA
Hackinet
@DoomedBlocks
Your code:
Code:
if(mysqli_num_rows($result) != 0)
Spit the line into two sub-lines, it should somewhat look like this:
Code:
$resultvalue = mysqli_num_rows($result);
if($resultvalue != 0);
thats a common error in php versions prior to PHP 5.5
#7 · edited 9y ago · 9y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • New Rule About Hack PacksBy Lehsyrus in Alliance of Valiant Arms (AVA) Hacks & Cheats
    16Last post 13y ago
  • Be careful, new version! [1.9.446]By urbanlucky in Call of Duty Modern Warfare 3 Discussions
    24Last post 13y ago
  • New AQ Game: Oversoul [ALPHA TEST LIVE AS OF 9/13]By Phailsauce in BattleOn Games Hacks, Cheats & Trainers
    4Last post 13y ago
  • ~~~~~NEW MAP NEW WEAPON~~~~~~~~By devilaim in Blackshot Hacks & Cheats
    10Last post 13y ago
  • Welcome to our new AvA minion.By Prepix in Alliance of Valiant Arms (AVA) Discussions
    51Last post 13y ago

Tags for this Thread

None