Php Get Textbox Value Same Page
Php Program 1: [compare.php]
[php]
<?php error_reporting(E_ALL ^ E_NOTICE); ?>
<?php
$test = $_POST[‘pname’];
if($test){
echo $test;
}else{
}
?>
<form method="post" action="compare.php">
Input Please :<input type="text" name="pname" id="pname "/>
</form>
[/php]
Php Program 2: [compare.php]
[php]
<?php error_reporting(E_ALL ^ E_NOTICE); ?>
<?php
$input = $_REQUEST [‘pname’];
echo $input;
?>
<form method="post" action="compare.php">
Input Please :<input type="text" name="pname" id="pname "/>
</form>
[/php]
Recommended Books: