ajax.php
changeset 81 d7fc25acd3f3
parent 80 cb7dde69c301
child 91 8079b0288e8e
equal deleted inserted replaced
80:cb7dde69c301 81:d7fc25acd3f3
   162       {
   162       {
   163         echo 'userlist = new Array(); namelist = new Array(); errorstring = false; '."\n";
   163         echo 'userlist = new Array(); namelist = new Array(); errorstring = false; '."\n";
   164         for($i=0;$i<sizeof($u);$i++) // Can't use foreach because we need the value of $i and we need to use both $u and $n
   164         for($i=0;$i<sizeof($u);$i++) // Can't use foreach because we need the value of $i and we need to use both $u and $n
   165         {
   165         {
   166           echo "userlist[$i] = '".addslashes($n[$i])."';\n";
   166           echo "userlist[$i] = '".addslashes($n[$i])."';\n";
   167           echo "namelist[$i] = '".addslashes($u[$i])."';\n";
   167           echo "namelist[$i] = '".addslashes(htmlspecialchars($u[$i]))."';\n";
   168         }
   168         }
   169       } else {
   169       } else {
   170         die('userlist = new Array(); namelist = new Array(); errorstring=\'No page matches found.\'');
   170         die('userlist = new Array(); namelist = new Array(); errorstring=\'No page matches found.\'');
   171       }
   171       }
   172       break;
   172       break;