filter-input Questions

7

Why does this line return null in my live server? filter_input(INPUT_SERVER, 'REQUEST_METHOD'); The live server is php5.5.9 Have I missed something? I thought it is used to replace the global ...
Coadjutor asked 10/8, 2014 at 20:59

6

I'm wondering if it's possible to get a variable whether it is in POST or GET and then use filter_input() to sanitize it. At first I thought that $var = filter_input(INPUT_POST | INPUT_GET, "var",...
Pineapple asked 2/8, 2013 at 14:31

1

Solved

Currently I'm making sort of calculator-like app in PHP with form as method of input. To secure input i'm using filter_input() function. As filter this function take one of elements from two groups...
Buttress asked 8/6, 2017 at 21:32

2

Solved

I'm discovering secrets of PHP. I've found one thing that I don't have answer to. I would like to access variables from super-global $_SESSION in class. Everything works but PHPMD engine to check m...
Hallowed asked 17/7, 2016 at 17:23

2

I am running an apache2 server where I do my localhost testing (PHP 5.5), but my hosting provider has PHP 5.3. I don't know whether that is an issue, but I mention it just in case. My problem is t...
Kalli asked 14/8, 2014 at 19:26

2

Solved

I'd like to have a clean, elegant way to set a variable to a GET parameter if said parameter is set (and numeric), and to 0 (or some other default) if it's not set. Right now I have: if (($get_id...
Paderna asked 21/11, 2014 at 8:24

6

Solved

In PHP 5.2 there was a nice security function added called "input_filter", so instead of saying: $name = $_GET['name']; you can now say: $name = filter_input (INPUT_GET, 'name', FILTER_SANITIZE...
Foliated asked 18/11, 2008 at 11:47
1

© 2022 - 2024 — McMap. All rights reserved.