I have create the insert.php file but it not work can nay one solve this matter....
<?php
// connect to the database
include("user-connect-db.php");
/*-------------------------------
EDIT RECORD
--------------------------------*/
// if the 'id' variable is set in the URL, we know that we need to edit a record
if (isset($_POST['submit']))
{
if (isset($_GET['id']))
{
// if the form's submit button is clicked, we need to process the form
// make sure the 'id' in the URL is valid
if (is_numeric($_POST['id']))
{
// get variables from the URL/form
$id = $_POST['id'];
$feedback = htmlentities($_POST['feedback'], ENT_QUOTES);
// if everything is fine, update the record in the database
if ($stmt = $mysqli->prepare("UPDATE sblnrat SET feedback= ? WHERE id=?"))
{
$stmt->bind_param("si", $feedback, $id);
$stmt->execute();
$stmt->close();
}
// show an error message if the query has an error
else
{
echo "ERROR: could not prepare SQL statement.";
}
// redirect the user once the form is updated
header("Location: member-view.php");
}
}
// if the 'id' variable is not valid, show an error message
else
{
echo "Error...............!!!!!!!";
}
}
// close the mysqli connection
$mysqli->close();
?>