PHP HTML Form Input Example

PHP HTML Form Input Example

make a file “php-html-form-input-example.php" then copy & paste blow code.



      echo "<h2>Form Submitted Successfully!! Bellow is the data</h2>";
      echo "<hr>";
      echo "</br>Your Name :{$_POST['Fullname']}";
      echo "</br>Your Age :{$_POST['UserAge']}";
      echo "<hr>";


<h2>PHP HTML Form Input Example</h2>

<form name="UserInformationForm" method="POST" action="#">
      Enter Your Full Name :
      <input name="Fullname" type="text" value="<?php echo $_POST['Fullname']; ?>"><br/><br/>
      Enter Your Age :
      <input name="UserAge" type="text" value="<?php echo $_POST['UserAge']; ?>"><br/><br/>
      <input name="BtnSubmit" type="submit" value="Submit">

Fire-up your favorite browser to see the effect of a blank HTML form with input box in PHP "http://localhost/html/php-html-form-input-example.php". Browser output should look like as follows:


Now fill-up the HTML form and get submitted data in PHP "http://localhost/html/php-html-form-input-example.php". Browser output should look like as follows:


Related Tutorial Examples

  1. PHP HTML Form textarea Example
  2. PHP HTML Form radio button Example
  3. HTML Form Example in PHP
  4. 20 steps to make CakePHP Blog Project
  5. MySQL isnull() Function Example
  6. MySQL least() Function Datetime Value Example
  7. MySQL sample database script: Create Database using SQL Statement Example
  8. MySQL Sub-Query: INSERT INTO SELECT... Example
  9. SELECT all rows of a Table using SQL Command MySQL Example
  10. PERL Example: Use of Multidimentional Array in PERL

No comments:

Post a Comment

leave your comments here..