|
-
Sep 21st, 2011, 07:54 AM
#1
[RESOLVED] Filtering & sanitizing user comments
Hi guys 
I'm creating a comment system, where users could post their comments about particular titles.
I'll collecting:
- Name
- Email
- Comment
- IP address (via $_SERVER['REMOTE_ADDR'])
I'll be storing this comments in the database and will be displaying later.
What I wanna do:
- remove any sql injection possibilies (presently, I'm not using PDO or mySQLi)
- remove any possible HTML code or any scripts being entered by the user
- display only plain-text
I have tried gathering some info from Google.
strip_tags()
PHP Filter Functions
htmlentities
But I'm a bit confused as some people used depreciated functions.
If you are supposed to create something like this, what all things will you use/include ?
Thanks
If my post was helpful to you, then express your gratitude using Rate this Post. 
And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet
Social Group: VBForums - Developers from India
Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|