Contact form not working due to permalinks?
-
Hello everyone, I was adding a simple contact form on my wordpress’ beta site https://www.imagina.com.uy/london/contact-international-house-montevideo/
the ‘action’ is $_SERVER[‘PHP_SELF’] and some code runs according to the information recived after clicking the send button.
as I said, a simple contact form.
Thing is, when I submit the form, wordpress isn’t recognizing the permalink and it’s giving me a not found page ??
any help would be greatly appreciated
just in case u’d like to see the code
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post" style="margin-top:15px; float:left;"> <div class="block"><label>Your e-mail:</label><input type="text" name="email" value="[email protected]" /></div> <div class="block"><label>Your name:</label><input type="text" name="name" value="Santiago Pardo" /></div> <div class="block"><label style="width:auto;">The message:</label></div> <div class="block"><textarea name="message">Hola que tal queria recibir informacion de los cursos</textarea></div> <div class="block"><input type="submit" value="" name="submit" /></div> </form> <?php if(isset($_POST['submit'])){ if (!empty($_POST['name'])) { if (!empty($_POST['email'])) { $from = $_POST['name'] . " - " . $_POST['email'] ; $mensaje = $_POST['message']; $asunto = "Contacto desde el Sitio web"; $done = "done"; mail("[email protected]", "{$asunto}", "{$mensaje}", "{$from}"); echo('<div class="popupWrapper"><div class="popup"><p>You message was sent succesfully</p><span class="popupbutt"><span><a href="#" class="hidePU">Back</a></span></span></div></div>'); } else echo('<div class="popupWrapper"><div class="popup"><p>Remember: if you don′t type your email we<br/>can′t write you back</p><span class="popupbutt"><span><a href="#" class="hidePU">Back</a></span></span></div></div>'); } else echo('<div class="popupWrapper"><div class="popup"><p>You forgot to write down your name</p><span class="popupbutt"><span><a href="#" class="hidePU">Back</a></span></span></div></div>'); } ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Contact form not working due to permalinks?’ is closed to new replies.