$_POST["entry"], "sourceip" => $_SERVER['REMOTE_ADDR'], "date" => time(), "name" => $_POST["name"], "message" => $_POST["message"], "found" => $_POST["found"], "website" => $_POST["website"], "cool" => $_POST["cool"], "reply" => "", "modstatus" => $modstatus ); $filename = $datadir."posts.json"; $extantPosts = json_decode(file_get_contents($filename)); array_push($extantPosts, $currentPost); file_put_contents($filename, json_encode($extantPosts, JSON_PRETTY_PRINT)); } } $referrer = preg_replace("/\?.*/", "", $_SERVER['HTTP_REFERER']); header("Location: $referrer?return=$returnCode"); ?>
Your post has been submitted! It's weird that you're seeing this page though. Maybe your browser can't process location headers? At any rate, click here"; ?> to get where you're supposed to be right now.