php - Fatal error: Can't use function return value in write context in [filter_input] -


i'm learning php , have problem think filter_input function.

<?php   if (!isset(filter_input(input_cookie, 'nazwa')) && !isset(filter_input(input_get, 'nazwa'))) {     include ("header.html");     include 'form.html';     include 'footer.html'; } else if (isset(filter_input(input_get, 'nazwa'))) {     setcookie("nazwa", (filter_input(input_get, 'nazwa')), time() + 60*60*24*365);     include 'header.html';     echo "<p> dziękujemy za podanie danych.</p>";     include 'footer.html'; } else {     include 'header.html';     echo "witamy, zostałeś rozpoznany jako {filter_input(input_cookie, 'nazwa')}.";     include 'footer.html'; }  ?> 

i got:

fatal error: can't use function return value in write context in c:\users\user\documents\netbeansprojects\phpproject3\cookie\index.php on line 4

could plese me?

you using

isset(filter_input(input_get, 'nazwa') 

instead, use (everywhere call isset()):

$func = filter_input(input_cookie, 'nazwa'); isset($func) 

directly php documentation

warning isset() works variables passing else result in parse error. checking if constants set use defined() function.

isset() language construct. not normal function.


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -