You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

47 lines
1.2 KiB

<?php
include "header.php";
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
$db_query = "select * from notice where id = '$id'";
$data = mysqli_query($link, $db_query);
foreach($data as $data) :
?>
<style>
.nextline {
width: 100%;
height: 0;
}
</style>
<script>
$(function(){
$('#btn').click(function(){
history.go(-1);
});
});
</script>
<div class="container">
<form class="form-inline" method="post" action="#">
<div>
<label for="title">標題</label>
<input type="text" name="title" id="title" size="30" maxlength="25" value="<?php echo $data['title']; ?>" required>
</div>
<div class="nextline"></div>
<div>
<label for="content">內容</label><br>
<textarea class="form-control2" name="content" id="content" rows="8" cols="100" required><?php echo $data['content']; ?></textarea>
</div>
<div class="nextline"></div>
<div>
<br>
<button type="button" name="btn" id="btn">回上頁</button>
</div>
<input type="hidden" name="id" value="<?php echo $id; ?>">
</form>
</div>
<?php
endforeach;
include "footer.php";
?>