PHP 코드
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
<! DOCTYPE html>
<html lang = "kr" >
<head>
<meta charset = "utf-8" >
<title> 키보드와 하루 </title>
</head>
<body>
<?php
$v_keyname = $_POST [ "key_name" ];
print_r( $v_keyname );
?>
//폼에 있는 데이터를 현재 페이지에 던지기
<form method = "POST" action = "<?php echo $_SERVER [ 'PHP_SELF' ];?>" >
<label>
<input type = "radio" name = "key_name" value = "keyman1"
<?php if ( $v_keyname == "keyman1" { echo "checked" ;} ?> >
키 관리자1
</label>
<label>
<input type = "radio" name = "key_name" value = "keyman2"
<?php if ( $v_keyname == "keyman2" { echo "checked" ;} ?> >
키 관리자2
</label>
<input type = "submit" value = "전송" />
</form>
</body>
</html>
|