--- 20220126/Address.php
+++ 20220126/Address.php
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 |
public function updateTest($no, $name, $age, $tel, $area, $birth) { |
38 | 38 |
try { |
39 | 39 |
$stmt = $this->db->prepare("update address set name=?, age=?, tel=?, area=?, birth=? where no=?"); |
40 |
- $stmt->execute(array($no)); |
|
40 |
+ $stmt->execute(array($name, $age, $tel, $area, $birth, $no)); |
|
41 | 41 |
return true; |
42 | 42 |
}catch (PDOException $e) { |
43 | 43 |
echo $e; |
--- 20220126/address_update_front.php
+++ 20220126/address_update_front.php
... | ... | @@ -32,7 +32,8 @@ |
32 | 32 |
<label for="birth"> |
33 | 33 |
생년월일 : <input type="date" name="birth"> |
34 | 34 |
</label> |
35 |
- <button type="submit">수정</button> |
|
35 |
+ <br><button type="submit">수정</button> |
|
36 | 36 |
</form> |
37 |
+ <button onclick="document.location.href='address_view.php'">취소</button> |
|
37 | 38 |
</body> |
38 | 39 |
</html>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?