🔒 Closed Guys patulong po huhu

Status
Not open for further replies.

igopako456

Fanatic
paano po maupdate yung status? ayaw po kasi mabago sa database, paano po kaya gagawin para mag update po?

Capture.webp
 
<form action="../execute.php" method="POST" id="form">
<input type = "text" name="dups" id="dups" value=""
<select name="div" id="div" class="form-control" method="POST">

<option value="" disabled selected hidden>Select Status...</option>
<option value=1>Pending</option>
<option value=2>Reserved</option>
<option value=0>Cancelled</option>
</select>

</b>
</li>

function update_reserved($div, $ids){

$conn = $GLOBALS['conn'];
$query = mysqli_query($conn, "UPDATE reserve SET Status='$div' WHERE reserve_ID='$ids'
");

return $query;
}

if(isset($_POST['sub'])){
$div = $_POST["div"];
$ids = $_POST["dups"];


$result = update_reserved($div, $ids);

if($result == true){
$_SESSION['notif2'] = '<div class="alert alert-success alert-dismissible fade show" role="alert">
<strong>Good</strong> New record updated.
<button type="button" class="close" style="margin-left: 90%;" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</div>';
}else{
$_SESSION['notif2'] = '<div class="alert alert-danger alert-dismissible fade show" role="alert">
<strong>Not Good</strong> Failed to update lot.
<button type="button" class="close" style="margin-left: 90%;" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</div>';
}
 
Status
Not open for further replies.

About this Thread

  • 3
    Replies
  • 515
    Views
  • 2
    Participants
Last reply from:
igopako456

Trending Topics

Online now

Members online
1,050
Guests online
934
Total visitors
1,984

Forum statistics

Threads
2,274,917
Posts
28,959,318
Members
1,233,485
Latest member
senpaikatzu_88
Back
Top