Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help][PHP] Filtering/cleaning variables?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="twentyfour" data-source="post: 313294" data-attributes="member: 54037"><p>Hey everyone, just wanted to say this is my first post on any forum ever, so don't hurt my feelings.</p><p>^-^</p><p></p><p>While working on my retro that I started a couple months back, I've learned a good bit about PHP, but I'm still far from an expert. I'm fairly advanced with HTML and CSS, so I'm not a noob (unlike a lot of cheap hotel owners I see). However, I ripped some code from a cms sometime ago for the Homes page (honestly forgot which cms it was) and i saw this little bit of code:</p><p>[PHP]function clean($str) {</p><p>$str = @trim($str);</p><p>if(get_magic_quotes_gpc()) {</p><p>$str = stripslashes($str);</p><p>}</p><p>return mysql_real_escape_string($str);</p><p>}[/PHP]</p><p></p><p>I've seen some talk about cleaning variables and what not here on the forums, but why? If that code wasn't there how could a hacker exploit my cms? I use Rev btw. </p><p>Also, the CMS I'm building for my retro is almost complete, and I would really appreciate it if anybody experienced in server-side coding could test its security (ethically, of course). Just PM me.</p></blockquote><p></p>
[QUOTE="twentyfour, post: 313294, member: 54037"] Hey everyone, just wanted to say this is my first post on any forum ever, so don't hurt my feelings. ^-^ While working on my retro that I started a couple months back, I've learned a good bit about PHP, but I'm still far from an expert. I'm fairly advanced with HTML and CSS, so I'm not a noob (unlike a lot of cheap hotel owners I see). However, I ripped some code from a cms sometime ago for the Homes page (honestly forgot which cms it was) and i saw this little bit of code: [PHP]function clean($str) { $str = @trim($str); if(get_magic_quotes_gpc()) { $str = stripslashes($str); } return mysql_real_escape_string($str); }[/PHP] I've seen some talk about cleaning variables and what not here on the forums, but why? If that code wasn't there how could a hacker exploit my cms? I use Rev btw. Also, the CMS I'm building for my retro is almost complete, and I would really appreciate it if anybody experienced in server-side coding could test its security (ethically, of course). Just PM me. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
[Help][PHP] Filtering/cleaning variables?
Top