PHP 코드
send.php
1
2
3
4
5
6
7
8
9
10
11
12
13
|
<!
DOCTYPE
html>
<html lang
=
"kr"
>
<head>
<meta charset
=
"utf-8"
>
<title>
키보드와 하루
</title>
</head>
<body>
<form method
=
"POST"
action
=
"call.php"
>
숫자 :
<input type
=
"text"
name
=
"testNumber"
/>
<input type
=
"submit"
value
=
"전송"
/>
</form>
</body>
</html>
|
call.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
<?php
$v_Number
=
$_POST
[
"testNumber"
];
if
(
ctype_digit
(
$v_Number
))
{
print
(
"숫자는 0~9까지 입니다."
);
}
if
(
is_numeric
(
$v_Number
))
{
print
(
"음수,소수점 등 모든 범위의 숫자입니다."
);
}
?>
|