Code: Select all
I'veCode: Select all
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 've','Re: Looping Battles','4486329')' at line 2Code: Select all
I'veCode: Select all
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 've','Re: Looping Battles','4486329')' at line 2Code: Select all
//XSS Security
function Escape($t)
{
return htmlentities($t, ENT_QUOTES);
}
Worked perfect! Thank you!vitinho444 wrote:Let's say you are POSTING the form to other page or even the same as the name: $_POST["message"]
Whenever you put that in your db just remember to escape firstThat prevents XSS (tutorial i used is in IR), and allows you to have single and double quotes without damaging the queryCode: Select all
//XSS Security function Escape($t) { return htmlentities($t, ENT_QUOTES); }
PS: You don't need the function i have, just use: htmlentities($_POST["message"], ENT_QUOTES);
Thanks, I'll read on that as wellOldRod wrote:Sounds like you are not escaping the string properly.
It's been a while, but I think mysql_real_escape_string fixes this:
http://php.net/manual/en/function.mysql ... string.php
This is some inspiration for people to help... Wow i'm addicted to helping people.Worked perfect! Thank you!
Yes... When someone asks something that I know? I'll be the first to helpvitinho444 wrote:This is some inspiration for people to help... Wow i'm addicted to helping people.Worked perfect! Thank you!