I've the following HTML form:
<form class="page-footer_enquiry-form" id="page-footer_enquiry-form" method="post" autocomplete="on" action="../php/enquiry.php">
<h2 class="page-footer_enquiry-form-title">Enquiry</h2>
<!-- Name -->
<div class="page-footer_enquiry-form-name">
<label for="footer-enquiry-name">
<span class="page-footer_enquiry-form-label">Full Name</span>
<input type="text" id="footer-enquiry-name" name="fullname">
</label>
</div>
<!-- Email -->
<div class="page-footer_enquiry-form-email">
<label for="footer-enquiry-email">
<span class="page-footer_enquiry-form-label">Email Address</span>
<input type="email" id="footer-enquiry-email" name="email">
</label>
</div>
<!-- Message -->
<div class="page-footer_enquiry-form-message">
<label for="footer-enquiry-message">
<span class="page-footer_enquiry-form-label">Message</span>
<textarea name="message" id="footer-enquiry-message" rows="10" cols="50"></textarea>
</label>
</div>
<input name="submit" type="submit" value="Send Message" class="button-dark">
<p class="page-footer_enquiry-form-dialog"></p>
</form>
Which is "handled" by the following PHP:
if( isset( $_POST['submit'] ) ){
echo 'first';
} else {
echo 'second';
};
Whenever I press the submit button, I'm getting 'second' (logged to the console via js).
I fear it'll be something obvious to somebody else, but I just can't identify the problem. Help, please.
Aucun commentaire:
Enregistrer un commentaire