Skip to content

Instantly share code, notes, and snippets.

@felmoltor
Last active August 23, 2023 20:42
Show Gist options
  • Save felmoltor/ef24a47afe056781161d6442b592a061 to your computer and use it in GitHub Desktop.
Save felmoltor/ef24a47afe056781161d6442b592a061 to your computer and use it in GitHub Desktop.
secret
<?php
if (isset($_GET["msg"])){
$errorMsg = "Error 1005: ".$_GET["msg"];
}
else{
$errorMsg="";
}
?>
// […]
<script defer nonce="<?=$_SERVER['CSP_NONCE']; ?>">
function displayError(){
document.getElementById('error-div').innerText="<?=$errorMsg?>";
}
displayError();
</script>
// […]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment