Isset

My question is: what does isset stand for, or what is it short for. ie:

if (isset($_GET['addjoke']))
{
	include 'form.html.php';
	exit();
}

and

if (isset($_POST['joketext']))
{
	$joketext = mysqli_real_escape_string($link, $_POST['joketext']);
	$sql = 'INSERT INTO joke SET
			joketext="' . $joketext . '",
			jokedate=CURDATE()';
	if (!mysqli_query($link, $sql))
	{
		$error = 'Error adding submitted joke: ' . mysqli_error($link);
		include 'error.html.php';
		exit();
	}

isset is how PHP checks to see if the variable in question has a value; Basically: “is set”

So it is looking got a “true” value. Checking to see if a link/button was submitted to the server… thx

No problem.

it may be a little broader than that but I believe that’s it’s main focus. I use it for 2 things:

check if a form button has been pressed

if(isset($_POST['formBtn'])){ 
    //Get form variables and use them somehow (ex SQL insert statement)
}

check if a variable has been given a value:



$variable = "Value";

if(isset($variable)){
     echo "Variable has been set";
}


No.


$flag = false;
$flag2 = NULL;
$flag3 = 0; //Note: All three of these in an IF statement are 'False'.

echo isset($flag) //TRUE
echo isset($flag2) //FALSE
echo isset($flag3) //TRUE
echo isset($flag4) //FALSE (Never existed)

isset looks for non-NULL, existing variables. ‘true’ is not a correct statement.