Jump to content

$GET


ecabrera

Recommended Posts

There's typecasting, number functions, string checking,

// for example,
(int)$_GET['v']
floor($_GET['v']) == ceil($_GET['v'])
(float)$_GET['v'] == ($_GET['v'] + 0)
ctype_digit($_GET['v'])

or regular expressions which you shouldn't use because there's plenty of better options.

Link to comment
https://forums.phpfreaks.com/topic/261347-get/#findComment-1339242
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.