What is the use of isset function in php? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 2

What is the use of isset function in php?

6th Jan 2017, 2:19 PM
Saumya Saloni
Saumya Saloni - avatar
5 Antworten
+ 3
Its not only works with var to check if they are not empty and save errors, its also works with forms. if isset($_POST[fieldname]) //send to database else echo 'enter fieldname';
6th Jan 2017, 3:04 PM
Nahuel
Nahuel - avatar
+ 2
You'll find the best answer over here: http://php.net/manual/de/function.isset.php
6th Jan 2017, 2:21 PM
Jonas Fallmann
Jonas Fallmann - avatar
+ 2
it returns a boolean value (TRUE or FALSE) based on the parameter given. This way you can check if (in example) a variable is actually set or not.
6th Jan 2017, 2:43 PM
John van den Elzen
John van den Elzen - avatar
+ 1
It is used for pressing the button to do some specific functions calling by functions like. if isset($_POST['sing_up']){ echo "Thank you for Signup"; }
7th Jan 2017, 10:39 AM
Jan Sher
Jan Sher - avatar
+ 1
hz
1st Mar 2017, 11:25 PM
mazahaka-7
mazahaka-7 - avatar