Skip to content

Instantly share code, notes, and snippets.

@tisuchi
Created December 4, 2017 14:51
Show Gist options
  • Select an option

  • Save tisuchi/9886a7aa1d000882d4bcb51e505f2044 to your computer and use it in GitHub Desktop.

Select an option

Save tisuchi/9886a7aa1d000882d4bcb51e505f2044 to your computer and use it in GitHub Desktop.
<?php session_start();
//php edit delete records
?>
<!DOCTYPE html>
<html>
<head><title>Edit Details</title></head>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div.container
{
width: 100%;
border: 1px gray;
}
header, footer
{
padding: 1em;
color: white;
background-color: grey;
clear: left;
text-align: center;
}
body{
background-color: #F5DEB3;
<!--#CCCCCC #FFFFFF-->
}
table, th, td, tr
{
border: 1px solid black;
border-collapse: collapse;
table-layout: initial ;
}
th, td , tr
{
padding: 1px;
text-align: center;;
}
th
{
text-align: center;
}
</style>
</head>
<header>
<div class="container">
<h1> View Aduan </h1>
<div class="bg"></div>
<p><center>
<img src="bersekutu.jpg" alt="mpm image" width="90" height="100">
<img src="jata.jpg" alt="mpm image" width="100" height="100">
<img src="MPM.png" alt="mpm image" width="100" height="100">
<img src="IIUM_Logo.png" alt="mpm image" width="350" height="100">
</p></center>
<input type="button" value="BACK TO MAINPAGE" onclick="window.location.href='index.php'" />
</header>
<article><p>
<body>
<form name="form" action="" method="post">
<table style= "width:100%" border= "1">
<!--<table id="dataTable" style= "width:100%" border= "1">-->
<?php
include "connect.php";
$query = "select * from aduan where referenceNo =".$_GET["id"];
$result = mysql_query($query);
echo "<br>";
echo "<form method=\"post\" action=\"edit2.php\">";
echo "<table border=\"1\">";
if($result)
while($row=mysql_fetch_array($result))
{
$referenceNo=$row['referenceNo'];
$dateReceive=$row['dateReceive'];
$details=$row['details'];
$investDate=$row['investDate'];
$investofficer=$row['investofficer'];
$feedback=$row['feedback'];
echo "<tr>";
echo "<tr><td><b>REFERENCE NO</td><td><input type=\"text\" name=\"referenceNo\" readonly value=\"$referenceNo\"></td></tr>";
echo "<tr><td><b>DATE OF RECEIVE</td><td><input type=\"date\" name=\"dateReceive\" value=\"$dateReceive\"></td></tr>";
echo "<tr><td><b>DETAILS</td><td><textarea name=\"details\" value=\"$details\"><\textarea></td></tr>";
echo "<tr><td><b>INVESTIGATING DATE</td><td><input type=\"date\" name=\"investDate\" value=\"$investDate\"></td></tr>";
echo "<tr><td><b>INVESTIGATING OFFICER</td><td><input type=\"text\" name=\"investofficer\" value=\"$investofficer\"></td></tr>";
echo "<tr><td><b>FEEDBACK FROM OFFICER</td><td><input type=\"text\" name=\"feedback\" value=\"$feedback\"></td></tr>";
}
}
echo "</table>";
echo "<br>";
echo "<input type=\"submit\" value=\"Update\">";
echo "</form>";
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment