Jump to content

!is_int


salihk.

Recommended Posts

Hello everyone,

I have no well knowledge about php coding.

I am trying to write simple php code for take some datas from mysql. My problem is  whhen i try to control my values that i take from get html with get command.

 

if(!is_int($_REQUEST["num"])

die('It is not integer');

 

When i put integer to num variable for example 2 it prints It is not integer.

Maybe i misunderstand the "!" think.

Could you help me to figure out

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/204646-is_int/
Share on other sites

But in order to check the function is_int() works or not i assigned the num value to a variable

$num=$_REQUEST["num"] and add an integer

$num=$_REQUEST["num"] +1; so it is output was correct

 

than i put it to

if(is_not($num))

die('it is integer');

it prints it is integer

 

than change the code to

 

if(!is_not($num))

die('it is not integer');

and the result is the same it prints again  :-\

 

 

Link to comment
https://forums.phpfreaks.com/topic/204646-is_int/#findComment-1071461
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.