EDIT: Fred -ii-, I have been looking over the page you referenced to resolving my issue ( PHP: "Notice: Undefined variable", "Notice: Undefined index", and "Notice: Undefined offset") however I cannot see anything linked to Mmy question, could you please elaborate?
I've been trying to set my code so that once you click on a button it will update a field in my database, however it doesn't seem to do anything, I'm fairly new to php and any help would be greatly appreciated.
(Some of the connection information like $username has been changed to a more generic format).
<?php
$username = "username";
$password = "password";
$host = "localhost";
$db = $username;
$connection = connect($host, $username, $password, $db);
    if(isset($_POST["PSol"]))
    {
        $sql = "UPDATE MK1 SET Sol='Progress' WHERE id = 1";
        if (mysqli_query($connection, $sql)) {
            echo "success";
        } else {
            echo "Error: " . $sql . "<br>" . mysqli_error($connection);
        }
        mysqli_close($connection);
        echo "<p>Disconnected from server: ".$host."</p>";
    }
?>
<form action = "" method = "POST" name = "PSolCanvas" class = "PSolCanvas">
    <input name = "PSol" type = "button" class = "PSol" value = "P"/>
</form>
 
    