File name
Commit message
Commit date
File name
Commit message
Commit date
<?php
require_once("Address.php");
$address = new Address();
$list = $address->getList();
?>
<!doctype html>
<html lang="ko">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>조소록</title>
<style>
* {margin: 0 auto; padding: 0; text-align: center;}
td, th {padding: 10px;}
a {text-decoration: none; color: red;}
a:hover {background-color: tomato; color: black;}
</style>
</head>
<body>
<h1>주소록 사이트</h1>
<hr>
<div>
<form action="address_insert.php" method="post">
<label for="name">
이름 : <input type="text" name="name" size="5">
</label>
<label for="age">
나이 : <input type="text" name="age" size="2">
</label>
<label for="tel">
연락처 : <input type="text" name="tel" size="8">
</label>
<label for="area">
지역 :
<select name="area">
<option value="광주">광주</option>
<option value="서울">서울</option>
<option value="부산">부산</option>
</select>
</label>
<label for="birth">
생년월일 : <input type="date" name="birth">
</label>
<input type="submit" value="확인">
</form>
</div>
<table border="1">
<tr>
<th>번호</th>
<th>이름</th>
<th>나이</th>
<th>연락처</th>
<th>지역</th>
<th>생년월일</th>
<th colspan="2">수정/삭제</th>
</tr>
<?php foreach ($list as $value){ ?>
<tr>
<td><?php echo $value['no']?></td>
<td><?php echo $value['name']?></td>
<td><?php echo $value['age']?></td>
<td><?php echo $value['tel']?></td>
<td><?php echo $value['area']?></td>
<td><?php echo $value['birth']?></td>
<td><a href="updateFront.php?no=<?php echo $value['no']; ?>">수정</a></td>
<td><a href="delete.php?no=<?php echo $value['no']; ?>">삭제</a></td>
</tr>
<?php }?>
</table>
</body>
</html>