 <p><code>success</code> and <code>error</code> are <strong>never</strong> <code>set</code>, actually, unless your server is configured to execute <code>html</code> files as <code>php</code>, you won't be able to retrieve <strong>anything</strong> inside <code>contact.html</code>.</p> <p>rename <code>contact.html</code> to <code>contact.php</code> and try:</p> <pre><code>header("Location: contact.php?success=1"); </code></pre> <p>AND</p> <pre><code>header("Location: contact.php?error=1"); </code></pre> <hr> <p><strong>Important:</strong><br> In order to execute <code>php</code> files they need to have <code>.php</code> as file extension, otherwise, as @BurningCrystals said, they're just plaintext.</p>