Use if isset condition function in php woth POST and GET action

Description

if isset condition used show the result on same page on submit form

 

isset  function check the condition variable is set or not.

isset  function Value Type is Boolean.Checking a variable isset function 

Using the POST and GET method in a PHP form for submit form.

isset function syntax and used.PHP if isset function condition statement

syntax tutorial with example script code 

 

isset('')

 

isset($_POST["submit"])

 

isset($_GET["submit"])

 

isset($varb)

<?php 

if (isset($_POST["submit"])) {

    echo $_POST["stname"];    

}

?>

<form action='popup.php' method='post'>

<input name='stname' type='text'><br>

<input type='submit' name="submit" ><br>

</form>

If I want to form on one page that submits to another page so set the action='popup.php'