What is wrong with line 19 of my register script?
<?php
require('../usertest/userlist.inc.php');
function registerNewUser($username,$password)
{
global $userarray;
if(!ctype_alnum($username) or !ctype_alnum($password))
{
die("sorry, only alphanumeric letters allowed. (a-z,A-Z,0-9)");
}
if(isset($userarray[$username]))
{
die("sorry, name is taken.");
return false;
}
$username=addslashes($username);
$password=addslashes($password);
$addstring='<?php $userarray[\''.$username.'\']=\''.$password.'\';?>';
file_put_contents('userlist.inc.php', $addstring);
return true;//new user registered...
}
?>
thanks,
Game_replays