//form_post.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="xuly_form_post.php">
<label for="test">Nhập giá trị:</label>
<input type="text" name="test" id="test">
<input type="submit" name="submit" id="submit" value="Thực hiện">
</form>
</body>
</html>
//xuly_form_post.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
if(isset($_POST['test']))
{
echo $_POST['test'];
echo "<br/>".$_POST['submit'];
}
else
echo "Bạn phải thực hiện từ form!"
?>
</body>
</html>
0 comments:
Post a Comment