I have a table in mysql db as shown:
id usr request type status
1 name1 msg 1 leave Pending
2 name2 msg 2 sick Pending
3 name3 msg 3 leave Pending
I have two php files, namely addrequest.php and confirmrequest.php... As the name suggests, one allows the user to add a request for leave etc. and the other would be used to approve or deny the same. When a user creates a request, it gets added to the mysql db with the status 'Pending'. The 'Pending' status is added by default. Once the request is created, it becomes visible in the confirmrequest.php, only difference being that the status column in the latter would consist of a select tag with 3 options namely,
<select name="status" >
<option value="1"><? echo "$status"; ?></option>
<option value="1">Approved</option>
<option value="2">Dis-approved</option>
Once the approver selects the tag to approve or deny the same in confirmrequest.php, it should get updated in the mysql db. Only the record for which the request has been confirmed or denied should get updated in the db for which the request was created. How should i go about this???