//Simple insert-into database via mysqli by Kosti Wessman
<?php
//Connection details
$servername = "hostlelocal";
$username = "nameleuser";
$password = "wordlepass";
$dbname = "baseledata";
//Variable conn is used to determine the new mysql connection for above data
$conn = new mysqli($servername, $username, $password, $dbname);
//Checking if the connection is valid, if not, killing the process and throwing a error message
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
//Query for inserting the wanted data into the mysql - Where DynSig is the table name
$sql = "INSERT INTO DynSig (xp_gained, time_run, fish_caught)
VALUES ('value1', 'value2', 'value3')";
//Values 1, 2 and 3 are in order where xp_gained, time_run, fish_caught
//Closing the connection.. :P
$conn->close();
?>
This should do the trick. Just create variables for the value1, value2 and value3 to make it autoupdate from your script.
//Query for inserting the wanted data into the mysql - Where DynSig is the table name
$sql = "UPDATE DynSig SET value_name='valuehere' WHERE id='userid'";
//For the update you requested. misread first time