Muiter Muiter - 5 days ago 4
HTML Question

Form not submitting html

I am trying to get an simple email form to work.
It is not responding to my submit button.
What did I do wrong or is there something I left out?

<?php
if($error == 'ja')
{
// maak random getallen voor anti spam
$spam_1 = rand(1,10);
$spam_2 = rand(1,10);
$spam = 'Anti spam beveiliging, wat is het antwoord op deze som: '.$spam_1.' + '.$spam_2.' =';
?>

<form method="post" action="?">
<div class="row uniform 50%">
<div class="6u 12u$(xsmall)"><input type="text" name="name" id="name" placeholder="Name" <?php if($error_name == 'ja') {echo 'style="border:1px solid #E41C2E"';} ?> /></div>
<div class="6u$ 12u$(xsmall)"><input type="email" name="email" id="email" placeholder="Email" <?php if($error_email == 'ja') {echo 'style="border:1px solid #E41C2E"';} ?> /></div>
<div class="12u$"><textarea name="message" id="message" placeholder="Message" rows="4" <?php if($error_message == 'ja') {echo 'style="border:1px solid #E41C2E"';} ?> ></textarea></div>
</div>
</form>
<ul class="actions">
<li><input type="submit" value="Send Message" /></li>
</ul>
</div>
</form>
<?php
}

?>
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
echo 'working';
}


enter image description here

Answer

Include your submit field within the form.