File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
1
+ <h1>Edit Country:</h1>
2
+
3
+ <form method="POST" action="./applyChanges" style="display: flex; flex-direction: column; align-items: center">
4
+ <input type="hidden" name="id" value="<?php echo $ data ["country " ]["id " ] ?> " />
5
+ <input type="text" name="name" value="<?php echo $ data ["country " ]["name " ] ?> " />
6
+ <input type="text" name="capitalCity" value="<?php echo $ data ["country " ]["capitalCity " ] ?> " />
7
+ <select name="continent">
8
+ <?php
9
+ foreach ($ data ["continents " ] as $ continent ) {
10
+ $ selected = $ data ["country " ]["continent " ] == $ continent ? " selected " : '' ;
11
+
12
+ echo "<option value=' $ continent' $ selected> $ continent</option> " ;
13
+ }
14
+ ?>
15
+ </select>
16
+ <input type="number" min="0" max="4294967295" name="population" value="<?php echo $ data ["country " ]["population " ] ?> " />
17
+
18
+ <input type="submit" value="Submit" />
19
+ </form>
You can’t perform that action at this time.
0 commit comments