I have a table contains Orders data that was retrieved from a data base and there is a field called "status" contains a form with select options and a hidden input with the value of the order ID.. the issue that the form doesn't seem passing the data to the php file that will run the function.
I tried both POST and GET methods and what I noticed that the data are passed in the URL leading to the php file but with blank page.
this is the URL to show the parameters:
http://localhost/project_name/test2.php?submit.x=15&submit.y=22&status=new&orderId=190406053842
here is my HTML form
<td>
<form action="test2.php" method="GET">
<input type="image" name="submit" src="icons/submit.png" alt="Submit" style='width:30px;height:30px;border:0;' onclick="confirm('are you sure?')">
<select name="status">
<option value="new">new</option>
<option value="checking">checking</option>
<option value="processing">processing</option>
<option value="done">done</option>
</select>
<input type="hidden" name="orderId" value="<?php echo $row["ORDER_ID"]; ?>">
</form>
</td>
this is the php file (just echoing the result to make sure it works and proceed onwards)
<?php
$db = mysqli_connect('localhost', 'root', '', 'project_name');
if(isset($_GET['submit'])){
$status = $_GET['status'];
$ID = $_GET['orderId'];
echo $staus;
echo $ID;
}
?>
thank you.