Created
February 26, 2017 12:15
-
-
Save demonio/cc07d2dd2dfe4ef62abd23f849628a45 to your computer and use it in GitHub Desktop.
METODO ANTI-SPAM DE CAMPO OCULTO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Configure su página Web</h1> | |
<h2>Solicite un presupuesto sin compromiso</h2> | |
<p>Escoja el producto que más se adecue a sus necesidades y un experto se pondrá en contacto son usted para definir los detalles y empezar a trabajar. No espere un día más para lanzar su proyecto y hacerse visible.</p> | |
<form action="/index/contact" method="post"> | |
<select class="span1" name="web"> | |
<option value="1">1.0</option> | |
<option value="1_5">1.5</option> | |
<option value="2">2.0</option> | |
<option value="3">3.0</option> | |
</select><br> | |
<input type="text" class="span2" name="nombre" placeholder="Su nombre"><br> | |
<input type="text" class="span3" name="email" placeholder="Su email"><br> | |
<input type="text" name="telefono" placeholder="Su teléfono"> | |
<textarea class="span5" name="mensaje" placeholder="Su mensaje"></textarea><br> | |
<button class="btn" type="submit">Enviar</button> | |
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
*/ | |
class IndexController extends AppController | |
{ | |
public function index() | |
{ | |
} | |
public function contact() | |
{ | |
if ( empty($_POST['telefono']) ) | |
{ | |
$_POST['spam'] = 0; | |
Load::model('contact')->mail($_POST); | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[name="telefono"] { display:none !important; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment