Reply to topic
updating database
anandi


Joined: 22 Apr 2007
Posts: 1
Location: Goa
Reply with quote
hi,

I have a problem in updating database.Basically the project is Warden approval/Rejection of leave forms.There is a field called "status" in a table named "general". Basically the default status in the database I kept is pending. While I click on submit button either to approve or reject the request,the database is not updating to approve or reject.It is showin me pending itself.

Can any one help me out.
I tried the following code.

if ($_POST[status] == "approve")
{

$query="UPDATE general SET status= \"approved\" WHERE status= \"pending\"";
}
if ($_POST[status] == "reject")
{
$query="UPDATE general SET status='rejected' WHERE status='pending'";
}

Is tis code correct.Or iz there any other code for it.
Please help me out.[attachmentid=4335][attachmentid=4335][attachmentid=4335][attachmentid=4335]
updating database
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic