Community
All Features
Overview of all exisiting features.
Arcade
Play various games in the arcade.
Awards
Earn awards for different tasks.
Bug Tracker
Report site related bugs the right way.
Credits
Everything related to credits.
Groups
A list of user run groups you can join.
Help Center
Official regulations and help documents.
Member List
A list of all registered members.
Latest Announcements
Staff Recruitment | September 2022
Changelog #34 - 03/04/2022
April Update - Index Redesign and Unlock Content Experiment
Support
Shop
Upgrade
Log In
Create Account
NulledBB
General
Technology & Development
Backend Development
How to prevent form hijacking in PHP?
Create an account
Login
PrivateAlps.net - Offshore Cloud Services | VPS/RDP/VPN - Dedicated Servers - Webhosting - TOR Services - Auto Deploy
ADULTSLAYER.STORE 💎 #1 PORN SHOP | 700+ Hot Products: Brazzers, Teamskeet, Pornhub, NaughtyAmerica, Many More! | 💸 Secure PayPal & Card Payments | Satisfaction Guaranteed! 🔥
Backend Development
How to prevent form hijacking in PHP?
Submitted by greatlogix,
22-02-2016, 03:38 PM
, Thread ID: 18592
Thread Closed
Reply
RE: How to prevent form hijacking in PHP?
05-08-2017, 02:42 AM
This post was last modified: 05-08-2017, 02:45 AM by
dev
#10
Sanitize inputs by using the
trim($string)
function to strip leading and trailing whitespace and the
html_special_chars($string)
function to escape HTML special characters by converting to HTML entities.
PHP Code:
$input
=
html_special_chars
(
trim
(
$_POST
[
'input'
]));
And,properly escape the string using
mysql_real_escape_string
before substituting into your SQL query.
More
Users browsing this thread: 1 Guest(s)