23.03.2014, 19:53
hi all , i have a problem with "hackers" all times delete my accounts by using drop table..... all what i want to know...is how to make to check if inputtext have or not space ... anyone can help me please ?
stock DB_Escape(text[])
{
new
ret[80* 2],
ch,
i,
j;
while ((ch = text[i++]) && j < sizeof (ret))
{
if (ch == '\'')
{
if (j < sizeof (ret) - 2)
{
ret[j++] = '\'';
ret[j++] = '\'';
}
}
else if (j < sizeof (ret))
{
ret[j++] = ch;
}
else
{
j++;
}
}
ret[sizeof (ret) - 1] = '\0';
return ret;
}