Quite possibly the geekiest post I will post all year... but I was bored... tea-making-a-la-partial-PHP-mySQL. I have coding on the brain.
$result = mysql_query("SELECT mug,teabag,goats_milk,teaspoon FROM kitchen_cupboard WHERE `owner`='dolidh'",$db) or die(mysql_error());
if (mysql_num_rows($result)) {
foreach (mysql_fetch_assoc($result) as $key => $value) {
$$key = $value;
}
$hotwater=boilkettle(water);
$fillmug=$mug.'with'.($teabag+$hotwater;)
$stirred_tea=($teaspoon+(stir($fillmug)))-($teaspoon+$teabag);
$milkytea=$stirred_tea+$goats_milk;
$dolidhs_tea=($teaspoon+(stir($milkytea)))-$teaspoon;
sleep(3600);
header(location:makemoretea);
}
Kai's found a way of over-riding my tea script for his own gains (so I make him a cup too).... he refreshed the page.... teascript V2 will include a mySQL check to check the datetime that it has actually been an hour since the last cup. Possibly a digestive biscuit include :P
No comments:
Post a Comment