Modified ajax.php