I have an options form setup like this
When I press the submit button, I expect to call a function which draws a table from a SQL query
Trying to call said function like so:
<?php
$id = $_POST['id'];
if($id > 0) {
$sql2="SELECT * FROM data WHERE Id = '$id';";
$sql_res = mysqli_query($d,$sql2) or die("<h1>".mysqli_error()."</h1>");
tabula($sql_res);
}
?>
That results in an error - Undefined index: id
on line
$id = $_POST['id'];
Please help :(