cast post var
This commit is contained in:
parent
a225f5e172
commit
a6039318cd
|
@ -207,7 +207,7 @@ switch($_POST['act']){
|
||||||
echo json_encode($shipsCoords);
|
echo json_encode($shipsCoords);
|
||||||
break;
|
break;
|
||||||
case "fight":
|
case "fight":
|
||||||
if((is_int($_POST['width'])) && (is_int($_POST['height']))){
|
if((is_int(settype($_POST['width'],"integer"))) && (is_int(settype($_POST['height']),"integer")){
|
||||||
echo rand(0,$_POST['width']).",".$_POST['height'];
|
echo rand(0,$_POST['width']).",".$_POST['height'];
|
||||||
}else{
|
}else{
|
||||||
echo "boaf".$_POST['width']."-".$_POST['height'];
|
echo "boaf".$_POST['width']."-".$_POST['height'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user