I am trying to submit form data to a separate PHP file BUT the form keeps closing on me!
I tried both POST and GET and I tried action="ReadFrmData.php", without the "act=form". My browser is Chrome on Windows 10, PHP 7.1.26.
Here is the form:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<form method="post" action="ReadFrmData.php?act=form" name="myform">
Value:<input type="text" style = "width: 100px"name="sdata" value = "0"><br><br>
Set Position High Limit<input type="radio" name="Set" value="SetPosHigh"><br>
Set Position Low Limit<input type="radio" name="Set" value="SetPosLow"> <br>
<input type="submit" name="sendset" value="Send"/><br>
</form>
</body>
</html>
Here is the separate PHP file:
<?php
/* Read data and commands from the form */
include_once 'ChromePhp.php';
if (isset($_POST['sendset'])){ /* Command submit button */
$sdata = $_POST['sdata'];
$param = $_POST['Set'];
$val = 0;
ChromePhp::log("Sendset"); //console message
}
?>
I need to keep the form open. Thanks!