You aren't verifying any of the data passed. Also, I'd recommend using MySQLi for prepared statements to make things a little safer.
// create a new MySQLi object
$mysqli = new mysqli('host', 'user', 'password', 'database');
// create var for each POST array item you need
$slots_sold = $_POST['slots_sold'];
$total_figure = $_POST['total_figure'];
$apps_sat = $_POST['apps_sat'];
//check to make sure each field is set
if(isset($slots_sold) && isset($total_figure) && isset($apps_sat))
{
// prepare mysqli statement for your data
if($stmt->prepare("UPDATE stats SET `slots_sold` = ?, `total_figure` = ?, `apps_sat` = ?"))
{
// bind each variable to query, respectively (? is place holder for var)
// s = string ('sss' means three strings). i = integer if needed
$stmt->bind_param('sss', $slots_sold, $total_figure, $apps_sat);
$stmt->execute(); // execute your query
}
else
{
$stmt->error; // there was an error with the query, show the error
}
}
else
{
echo 'You did not fill out all of the fields.';
}
$stmt->close; // close mysqli connection
Hope this will help you a little bit. Depending on the data you are passing, I'd use preg_match to check the data in each. Here are some very simple regular expressions to get you started:
/[a-zA-Z ]+/ (Any letter, lowercase or uppercase including spaces atleast once)
/[a-zA-Z]+/ (Same as above, without spaces atleast once)
/[a-zA-Z0-9]+/ (Any letter, lowercase or uppercase including numbers atleast once)
/[0-9]+/ (Any number atleast once)
preg_match('/[a-zA-Z]+/', $str, $matches); // you can throw this in a for loop to check each var if they all require the same pattern