Unfortunately my hosting company won't allow me to run triggers.
So I'm trying the PHP route, I've set up a form to input the user_id, the odometer reading and the date, on Submit it loads a page with your PHP code on it, I've added the db connection,
But nothing appears on the page and the db doesn't get updated. I've assumed I needed to add something to this line,
// CODE TO GET RECORDS FROM DATABASE GOES HERE
$con = mysql_connect("localhost", "username", "password");
die('Could not connect: ' . mysql_error());
$db_selected = mysql_select_db("db_name",$con);
$sql = "SELECT `user_id`, `odometer`, `monthly_mileage`, `date` FROM `mileage`";
$result = mysql_query($sql,$con);
as nothing seemed to happen, so tried this,
$rows = '';// array of rows from database results
Not sure what to do now.
$row = '$query->last_row()';
$row = '$query->row(5)';