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 › Running HTML in a .PHP file

Running HTML in a .PHP file

Posts 1–7 of 7 · Page 1 of 1
Murdock69
Murdock69
Running HTML in a .PHP file
Hi guys I was working on a landing page and it required me to copy and paste all of my HTML code into a .php file. The code works and runs fine in HTML but as soon as it's copy-pasted into the PHP file none of the buttons or really anything work even when tested in the browser. Any help would be appreciated, I can provide the link to a pastebin of the .php file if needed.
#1 · 10y ago
Kain1
Kain1
The browser can read HTML differently than PHP does, for example paths to required files like CSS, JS, etc... Providing the pastebin would be great.
#2 · 10y ago
Murdock69
Murdock69
I figured out the problem with it, it wasn't necessarily the PHP it was a user error.
#3 · 10y ago
MA
Maze.
Note to beginners, never forget to redirect the style sheets when moving into new directories.
#4 · 9y ago
YE
Yetee
Do you have the HTML within the <?php ~php code~ ?> ?
#5 · 9y ago
VO
volt23
U can ask for free email help from local webstudio in your area, they usually are welcome to help, so u can try it if the problem is still actual.
#6 · 9y ago
kchoman
kchoman
Here's how you handle form data when you're not putting HTML in a PHP file:
Code:
<form action="confirm.php" method="post">
    <input type="submit" id="formButton" value="Submit" />
</form>
Here's how you handle form data when you're putting HTML in a PHP file:
Code:
<?php

if(filter_has_var(INPUT_POST, 'formSubmission')) {
    //TODO: Something with the form data...
}

?>
<form method="post">
    <input type="submit" id="formButton" name="formSubmission" value="Submit" />
</form>
Since the PHP will be loading with the HTML data, we don't want to automatically manage form data before the visitor can put anything in the form.
Plus don't forget to filter your inputs; it's just bad practice to call superglobal variables directly.

Code:
/** @Info: Simple non-regex email address filter. */
if(filter_input(INPUT_POST, 'emailAddress', FILTER_VALIDATE_EMAIL)) {
    //TODO: Success
} else {
    //TODO: Failure
}
#7 · 8y ago
Posts 1–7 of 7 · Page 1 of 1

Post a Reply

Similar Threads

  • php file upload type restrictionBy franzyx in PHP Programming
    5Last post 14y ago
  • How To View A Websites Index.php FileBy Jim Morrison in Exploits
    12Last post 12y ago
  • Dispatching a request through a php fileBy toby2449 in Realm of the Mad God Private Servers Help
    0Last post 11y ago
  • Unable to run game due to client file being corruptedBy final-legacy in Combat Arms Mod Help
    1Last post 13y ago
  • Selling Phising files [Php & Mysql]By niek123 in Trade Accounts/Keys/Items
    7Last post 18y ago

Tags for this Thread

None