![](/bink.gif) |
|
| ![](/bink.gif) |
PHP Æû(form)°ªÀÇ À¯È¿¼º üũ |
|
|
![](icon/private_name/1.gif) |
13³â Àü |
<!--³Ñ±â´Â ÆäÀÌÁö form.html ---->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>www.webmadang.net</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<style type="text/css">
<!--
td { font-family: "±¼¸²"; font-size: 9pt }
-->
</style>
</head>
<body>
<form method="POST" action="form_validation.php">
<table width="393" border="0">
<tr>
<td width="72"> À̸§</td>
<td width="311"> <input name="name" type="text" size="20"></td>
</tr>
<tr>
<td> ÁÖ¼Ò</td>
<td> <input name="addr" type="text" size="40"></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="Àü¼Û">
</div></td>
</tr>
</table>
</body>
</html>
<?
//¹Þ´Â ÆäÀÌÁö form_validation.php
function alert($msg)
{
echo"<script type='text/javascript'>alert('$msg');history.go(-1);</script>";
}
if (empty($_POST[name])){
$name = NULL;
alert("À̸§À» ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä!");
}
if (empty($_POST[addr])){
$addr = NULL;
alert("ÁÖ¼Ò¸¦ ÀÔ·ÂÇÏ¿© ÁÖ¼¼¿ä!");
}
echo "ÀԷ¿Ϸá";
?>
|
|
̵̧ : 474 |
̵̧
¸ñ·Ï
|
|
| ![](/bink.gif) |
|