//form_get.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="get" action="xuly_form_get.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>
<p>Click vào <a href="xuly_form_get.php?test=123">đây</a> để test</p>
</body>
</html>
//xuly_form_get.php<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
if(isset($_GET['test']))
{
echo $_GET['test'];
//echo "<br/>".$_GET['submit'];
}
else
echo "Bạn phải thực hiện từ form!"
?>
</body>
</html>
0 comments:
Post a Comment