Please login to start chat

ICT Solutions 2019-01-26 13:10:22
Category : php tutorials

Using html form in php

<?php
 if(isset($_POST["username"]) && isset($_POST["password"])){
  $username = $_POST["username"];
  $password = $_POST["password"];

  if(!empty($username) && !empty($password)){
   echo 'Welcome to TNW, '.$username.'!';
  }else{
   echo 'Fill in all fields!';
  }
 }
?>

<form action = "test.php" method = "POST">
 Username:<br />
 <input type = "text" name = "username"><br /><br />
 Password:<br />
 <input type = "password" name = "password"><br /><br />
 <input type = "submit" value = "Log In">
</form>

Comments:

No comment to show.

Available Services
Download Android Application