Jump to content

How To Check A ' $_Get ' Value Is 100% String Or Integer?


Eritrea

Recommended Posts

Suppose there is a url ex:

 

site.com/page.php?id=*ANTHING*

 

 

How do you check if *ANYTHING* is only string ( not composed of strings and integers ) or integer only.

 

 

Because, I used is_string() function to check it, but it only checks if the first letter is a string so

 

id=?cat435 and id=?catdasd will return the same result.

 

 

How can I make sure, if a value is then only a string or integer and not a combination of both

 

 

thanks

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.