Skip to content

Instantly share code, notes, and snippets.

@chrisnordqvist
Last active March 19, 2018 21:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisnordqvist/8b2a27993982ef64b15e2cd9db4e9bd0 to your computer and use it in GitHub Desktop.
Save chrisnordqvist/8b2a27993982ef64b15e2cd9db4e9bd0 to your computer and use it in GitHub Desktop.
<?php
session_start();
if ($_SERVER['REQUEST_METHOD'] == 'PUT'){
if(!isset($_SESSION["mittHoroscop"])){
$key = false;
echo "$key";
}
if(isset($_SESSION["mittHoroscop"])){
$key = 'invalid';
$_POST["socialnumber"] = $_PUT["socialnumber"];
include "class.php";
if($horoscope->isValid()){
$_SESSION["mittHoroscop"] = $horoscope->printSign();
$key = true;
}
echo "$key";
}
}
else{
echo "error";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment