isset is a function you can use to test if a variable is set or not. if (isset($something)) { //if the variable '$something' has a value set this code will run } else { //or if you didn't set '$something' yet this code will run } Setting a variable just means giving it a value like this: $something = 123; The manual explains it better than I can and is available in many languages
Hi friend, best thing to do is to use OUR friend. Google (search: isset). First result: http://php.net/manual/en/function.isset.php
Isset as mentioned above is to check if a variable is set or not hence is-set/isset. It works particularly well for form submissions to check if the user actually pressed the submit button. We do this to make sure to: A. Prevent a rogue user posting their own variables through the process system B. Prevent displaying irrelevant information to the user if they accidentally land on that page We can use the isset in this way like: if (ISSET($_POST['Submit'])){ echo "The form has been submitted"; //post some items from the form echo "Username: ".$_POST['username']."<br />Password: ".$_POST['password'].""; } PHP: This would post items from the form. To make a website dynamic, we can use the isset function to grab an ID from the URL and select the corresponding record from the database like: if (ISSET($_GET['id'])){ echo "The ID in the url is ".$_GET['id'].""; //select item from the database using the ID collected from the URL $sth = $dbh->prepare("SELECT username FROM users WHERE id = :id"); $sth->execute(array(":id"=>$_GET['id'])); while ($row = $sth->fetch()){ echo "The user's name is: ".$row['username'].""; } else { echo "There is no user"; } PHP: