So i'm trying to ammend data from a database in which a user will click ammend and it takes them to a form displaying the current data in which the user can then edit the data, however the data does not hold in the form.
The first page is
<?php
include 'connection.php';
$id=$_GET['id'];
$query = "SELECT * FROM products WHERE ProductID = '$id'";
$result = mysqli_query($connection, $query);
$row=mysqli_fetch_assoc($result);
?>
<form method="post" action="UpdateProduct.php">
<fieldset>
<legend>
Enter Product Details
</legend>
<input type="hidden" name="ProductID" value="<?php echo $row['ProductID'];?>" />
<label for="ProductName">Product Name: </label><br />
<input type="text" name="ProductName" value"<?php echo $row['ProductName'];?>"/><br /><br />
<label for="ProductPrice">Price: </label><br />
<input type="text" name="ProductPrice" value"<?php echo $row['ProductPrice'];?>"/><br /><br />
<label for="ProductImageName">Image Filename: </label><br />
<input type="text" name="ProductImageName" value"<?php echo $row['ProductImageName'];?>"/><br /><br />
<input type="submit" value="Submit"/>
<input type="reset" value="Clear"/>
</fieldset>
The second page is this
<?php
include 'connection.php';
$id=$_POST['ProductID'];
$ProductName=$_POST['ProductName'];
$ProductPrice=$_POST['ProductPrice'];
$ProductImageName=$_POST['ProductImageName'];
$query = "UPDATE products
SET
ProductName ='$ProductName', ProductPrice='$ProductPrice' ,
ProductImageName='$ProductImageName' WHERE ProductID='$id'";
mysqli_query($connection,$query);
header("location: watwk8.php");
?>
The image attached shows the empty form that should hold the value from the database i.e. mugs