My update function is not working the browser is showed $_GET['ticketID'] is not set.
<form action="ticketResolve.php" role="form" method="post">
<input type="hidden" name="ticketID" value="<?=$ticket['ticketID']?
<label for="username">Sender_name</label>
<input type="text" class="form-control" name="sender_name"placeholder="Enter Username" value="<=$ticket['sender_name']>"readonly>
</div>
<div class="form-group col-xs-6">
label for="firstName">Contact</label>
<input type="text" class="form-control" name="contact" placeholder="Enter First Name" value="<?=$ticket['contact']?>" readonly>
</div>
<br><br>
<button type="submit" class="btn btn-orange-1" name="resolveTicket">Resolve</button>
</form>
this is my form
ticketID is from this loop and transfer it to the ticketResolve.php page where the ticketID is use to get the details of the ticket, which works data from the database populate the input tags.
and this is the code in the ticketResolve.php page
$ticket = getTicketDetails($_GET['ticketID']);
if(isset($_POST['resolveTicket'])) {
resolveTicket($loggedUser['userName'], $loggedUser['userID'],
$_POST['ticketID']);
header("Location: admin_viewTickets.php");
}
<input type="text" value="<?=$text?>"> //this is showing 1
the "resolve" field should change from 0 to 1
Please help thank you