So I have to make a php page that approves/rejects some information taken by a specific row in a database. If the Admin that sees the info Approves it, he puts some extra values and updates the specific row in the database (these extra values are 0 before approval), but it ultimately doesn't work. I think the problem is with the approve.php file the submit form redirects to, i think it doesn't read the values the Admin inputs.
Here is the form (lecturermeet.php):
<div class="wrapper col3">
<div class="container">
<h1>Pending Meeting Submissions</h1>
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("dissdb") or die(mysql_error());
$statuscheck = 0;
$result = mysql_query("SELECT status FROM meeting WHERE status = '$statuscheck'");
if ($result != NULL) {
$result = mysql_query("SELECT id,username,date,subject,report FROM meeting WHERE status = '$statuscheck'");
while ($row = mysql_fetch_assoc($result)){
$uploader = $row['username'];
$date = $row['date'];
$subject = $row['subject'];
$report = $row['report'];
$id = $row['id'];
echo ' <font size=6> <p>Meeting: #' .$id. ' </font><br><br>Submitted by: '.$uploader.'<br>Date: ' .$date. '<br>Subject: ' .$subject. '<br>Report: ' .$report. '<br> <br></p>' ;
$showbuttons = 1;
if($showbuttons == 1) : ?>
<form>
Meeting #:
<input type="number" name="id" id="id" value='$id' min="1" max="20">
</form>
<form>
Project Progression Status (between 1 and 6):
<input type="number" name="progress" id="progress" min="1" max="6">
</form>
<form>
<br> Effort Shown (between 1 and 6):
<input type="number" name="effort" id="effort" min="1" max="6">
</form>
<form>
<br> Dissertation Projection (between 1 and 6):
<input type="number" name="projection" id="projection" min="1" max="6">
</form>
<form>
<br> Lecturer Satisfaction (between 1 and 6):
<input type="number" name="satisfaction" id="satisfaction" min="1" max="6">
</form>
<form>
<br> Overall (between 1 and 10):
<input type="number" name="mark" id="mark" min="1" max="10">
<br><br><br></form>
<form action="approve.php" method="post"
enctype="multipart/form-data">
<input type="submit" name="approve" value="Approve">
</form>
<label for="rejectinfo"><br><br><br>Rejection comments:</label>
<textarea name="rejectinfo" cols="60" rows="7" id="rejectinfo" ></textarea>
<p><form action="reject.php" method="post"
enctype="multipart/form-data">
<input type="submit" name="reject" value="Reject">
<br><br></form></p>
<?php endif;
}} ?>
</div>
</div>
and here is the approve.php the form redirects to in order to update the specific row:
<?php
require "config.php";
require "lecturerarea.php";
$id = $_POST['id'];
$progress = $_POST['progress'];
$effort = $_POST['effort'];
$projection = $_POST['projection'];
$satisfaction = $_POST['satisfaction'];
$mark = $_POST['mark'];
$status = 1;
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("dissdb") or die(mysql_error());
mysql_query("UPDATE meeting SET 'progress'='$progress', 'effort'='$effort',
'projection'='$projection', 'satisfaction'='$satisfaction', 'mark'='$mark', 'status'='$status' WHERE id = '$id'");
echo "The meeting submission is approved! <br> Redirecting now ....";
header("Refresh: 3; lecturerarea.php");
?>