forked from allenshih1/database
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit_country.php
More file actions
37 lines (37 loc) · 937 Bytes
/
edit_country.php
File metadata and controls
37 lines (37 loc) · 937 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php require_once("header.php"); ?>
<?php
if(isset($_SESSION['isAuth']) && $_SESSION['isAdmin'])
{
$id = $_POST['id'];
$abbr = $_POST['abbr'];
$name = $_POST['name'];
$longitude = $_POST['longitude'];
$latitude = $_POST['latitude'];
?>
<table style="width:500px">
<tr>
<td> abbr </td>
<td> name </td>
</tr>
<tr>
<form action="edit_country_func.php" method="post">
<input type="hidden" name="id" value="<?= $id ?>">
<td> <input type="text" name="abbr" value="<?= $abbr ?>"> </td>
<td> <input type="text" name="name" value="<?= $name ?>"> </td>
<td> <button type="submit">儲存</button> </td>
<td> <a href="country_management.php"><button type="button">取消</button></a> </td>
</form>
</tr>
</table>
<?php
} else if(isset($_SESSION['isAuth'])){
?>
permission denied
<?php
} else {
?>
please login first
<?php
}
?>
<?php require_once("footer.php"); ?>