Skip to content

Instantly share code, notes, and snippets.

@butlerx
Created March 17, 2017 15:54
Show Gist options
  • Save butlerx/fa607c24b2efc12993f533cee1dcec9f to your computer and use it in GitHub Desktop.
Save butlerx/fa607c24b2efc12993f533cee1dcec9f to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>test php</title> </head>
<body>
<?php
$temp = $_GET["temp"];
if (strlen($temp) != 0) {
temp($temp);
}
function temp($temp) {
if ($temp >= 18) {
echo "It's hot! It's ", $temp;
} else {
echo "It's cold! It's ", $temp;
}
}
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment