Shadowman321
Member
- Joined
- Mar 27, 2010
- Messages
- 205
- Reaction score
- 22
Notice: Uninitialized string offset: 3 in /var/www/ajax/check_name.php on line 67 Notice: Uninitialized string offset: -1 in /var/www/ajax/check_name.php on line 73
Lines 66-76:
Code:
for($i = 0; $i < strlen($name); $i++)
if($name[$i] == $name[($i+1)] && $name[$i] == $name[($i+2)])
{
echo '<font color="red">Name can\'t contain 3 same letters one by one.</font><br /><font color="green"><u>Good:</u> M<b>oo</b>nster</font><font color="red"><br />Wrong: M<b>ooo</b>nster</font>';
exit;
}
for($i = 0; $i < strlen($name); $i++)
if($name[$i-1] == ' ' && $name[$i+1] == ' ')
{
echo '<font color="red">Use normal name format.</font><br /><font color="green"><u>Good:</u> <b>Gesior</b></font><font color="red"><br />Wrong: <b>G e s ior</b></font>';
exit;
Everything works fine, but theres an error. I tried to hide this by adding ^ E_NOTICE in error reporting, but it doesn't work. And i have no idea whats wrong with that.