Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- include("config.php");
- if(isset($_POST['enviar'])){
- $hora = date("H:m:i");
- $data = date("d/m/Y");
- $nome = strip_tags($_POST['login']);
- $email = strip_tags($_POST['email']);
- $sql = mysql_query("INSERT INTO newsletter (nome, email) VALUES ('$nome', '$email')") or print(mysql_error());
- echo "cadastro efetuado com sucesso";
- }else{
- echo "Erro ao tenta cadastrar";
- }
- ?><form action="#" method="post" name="newsletter">
- <label>Nome:</label><br />
- <input type="text" name="nome" />
- <label>e-Mail:</label><br />
- <input type="text" name="email" />
- <input name="enviar" type="submit" class="enviar" value="Enviar">
- </form>
Add Comment
Please, Sign In to add comment