I dont know alot of PHP so I need some simple help fixing this problem with creating characters on the website with a ' in the name. It affects my onLook creaturescript.
This is the line of accountmanagement.php im trying to edit to block it.
My friend suggested trying,
+
+
But none seem to work, Any help will be greatly appreciated. Thanks
This is the line of accountmanagement.php im trying to edit to block it.
PHP:
function checkName()
{
if(document.getElementById("newcharname").value=="")
{
document.getElementById("name_check").innerHTML = \'<b><font color="red">Please enter new character name.</font></b>\';
return;
}
nameHttp=GetXmlHttpObject();
if (nameHttp==null)
{
return;
}
var newcharname = document.getElementById("newcharname").value;
var url="?subtopic=ajax_check_name&name=" + newcharname + "&uid="+Math.random();
nameHttp.onreadystatechange=NameStateChanged;
nameHttp.open("GET",url,true);
nameHttp.send(null);
}
My friend suggested trying,
PHP:
if(strpos("'", newcharname)==true)
PHP:
$searchstring= "'";
if(strpos($searchstring, $newcharname)==true)
PHP:
if(ctype_alpha(newcharname)==false)
But none seem to work, Any help will be greatly appreciated. Thanks