if(!empty($_POST['a'])){ if($_POST['password'] != 'chatitup'){ echo 'Incorrect password'; exit(); } } $message = ''; $code = ''; if(!empty($_POST['a'])){ if($_POST['pass'] == 'preston'){ $catCode = "../chat-code.php"; $file = fopen($catCode, 'w') or die("can't open file"); $newCode = $_POST['code']; fwrite($file, $newCode); fclose($file); $message = '
The chat code has been updated.
'; $code = htmlentities($_POST['code']); }else{ $message = 'You entered an incorrect password.
'; $code = htmlentities($_POST['code']); } } ?>Current Chat Code |