表單↓
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>註冊表單</title>
</head>
<body>
<form name="form2" method="post" action="receive2.php">
姓名:<input type="text" name="user"><br>
電話:<input type="text" name="phone" pattern="{0}(1){1}(9){9}"><br>
地址:<input type="text" name="address"><br>
生日:<input type="date" name="birth"><br>
Email:<input type="email" name="email"><br>
<input type="submit" value="送出">
</body>
</html>
PHP↓
<?php
$user=$_REQUEST['user'];
$phone=$_REQUEST['phone'];
$address=$_REQUEST['address'];
$birth=$_REQUEST['birth'];
$email=$_REQUEST['email'];
echo $user;
echo '<br>';
echo $phone;
echo '<br>';
echo $address;
echo '<br>';
echo $birth;
echo '<br>';
echo $email;
?>