Hyvor Developer
  Home   Download   Copy
Code
<!DOCTYPE html>
<html>
<head>
	<title>Form</title>
</head>
<body>

<?php if ($_SERVER['REQUEST_METHOD'] === 'POST') : ?>

	<p>Hello <?php echo $_POST['name'] ?>,</p>
	<p><?php echo $_POST['email'] ?> is your email.</p>

<?php else : ?>

	<form method="POST" action="">
		Name: <input type="text" name="name">
		Email: <input type="text" name="email">
		<input type="submit" name="submit">
	</form>
	
<?php endif; ?>

</body>
</html>
Result