I'm trying to have a simple webpage with a form to update one cell of my mysql table. I'm not sure why it's not sending the data to my table. I have two webpages. form.php and process.php. Below is the code for each respectively.
form.php
<!DOCTYPE HTML PUBLIC
<html>
<head>
<title></title>
</head>
<body>
<!-- form to get key detail of record in database -->
<form method="POST" action="process.php">
<input type="text" name="inputtest" />
<input type="submit" name"submitButton" value="Submit!" />
</form>
<?php
$inputtest = $_POST["inputtest"];
?>
</body>
</html>
process.php
<?php
$con=mysqli_connect("localhost","root","********","allstate");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM producers");
?>
<?php
UPDATE producers
SET TEST={$inputtest}
[WHERE ID=1]
?>