formulario de contacto
- magdyzaki
- Born


- Registrado: Nov 01, 2012
- Mensajes: 4
- Status: Offline
- Anonymous
- Bot


- Registrado: 25 Feb 2008
- Mensajes: ?
- Loc: Ozzuland
- Status: Online
Noviembre 1st, 2012, 5:45 pm
- demonmaestro
- Gold Member


- Registrado: Jun 21, 2006
- Mensajes: 484
- Loc: Conroe, Texas
- Status: Offline
- magdyzaki
- Born


- Registrado: Nov 01, 2012
- Mensajes: 4
- Status: Offline
Hola queridos,
Gracias por su ayuda.
Os adjunto dos códigos
primero el código html código dentro del contenido de la plantilla
segundo el código php pero no se encontró en la plantilla pero he descargado desde otro sitio
Gracias por su ayuda.
Os adjunto dos códigos
primero el código html código dentro del contenido de la plantilla
segundo el código php pero no se encontró en la plantilla pero he descargado desde otro sitio
Attachments:
Attachments:
- Zealous
- Guru


- Registrado: Abr 15, 2011
- Mensajes: 1195
- Loc: Sydney
- Status: Offline
magdyzaki escribió:
Hola queridos,
Gracias por su ayuda.
Os adjunto dos códigos
primero el código html código dentro del contenido de la plantilla
segundo el código php pero no se encontró en la plantilla pero he descargado desde otro sitio html.zip php.zip
Gracias por su ayuda.
Os adjunto dos códigos
primero el código html código dentro del contenido de la plantilla
segundo el código php pero no se encontró en la plantilla pero he descargado desde otro sitio html.zip php.zip
¿Así son los archivos html de la plantilla pero el código php que funciona es desde otro sitio?
¿También por qué usted no sólo publicarlo en el post con las etiquetas de código?
- magdyzaki
- Born


- Registrado: Nov 01, 2012
- Mensajes: 4
- Status: Offline
código PHP
---------------
código HTML
----------
---------------
Código: [ Select ]
<?php
$myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['message']))
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
{
$to = $myemail;
$subject = "$name";
$email_body = "You have received a new message.".
" Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contacts.html');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3(dot)org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact form handler</title>
</head>
<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>
</body>
</html>
$myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['message']))
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
{
$to = $myemail;
$subject = "$name";
$email_body = "You have received a new message.".
" Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contacts.html');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3(dot)org/TR/html4/loose.dtd">
<html>
<head>
<title>Contact form handler</title>
</head>
<body>
<!-- This page is displayed only if there is some error -->
<?php
echo nl2br($errors);
?>
</body>
</html>
- <?php
- $myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
- if(empty($_POST['name']) ||
- empty($_POST['email']) ||
- empty($_POST['message']))
- $name = $_POST['name'];
- $email = $_POST['email'];
- $message = $_POST['message'];
- {
- $to = $myemail;
- $subject = "$name";
- $email_body = "You have received a new message.".
- " Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
- $headers = "From: $myemail\n";
- $headers .= "Reply-To: $email";
- mail($to,$subject,$email_body,$headers);
- //redirect to the 'thank you' page
- header('Location: contacts.html');
- }
- ?>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3(dot)org/TR/html4/loose.dtd">
- <html>
- <head>
- <title>Contact form handler</title>
- </head>
- <body>
- <!-- This page is displayed only if there is some error -->
- <?php
- echo nl2br($errors);
- ?>
- </body>
- </html>
código HTML
----------
Código: [ Select ]
<!DOCTYPE html>
<html lang="en">
<head>
<title>Contact us</title>
<meta charset="utf-8">
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/superfish.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/tms-0.4.1.js"></script>
<script src="js/slider.js"></script>
<!--[if lt IE 8]>
<div style=' clear: both; text-align:center; position: relative;'>
<a href="http://windows.microsoft(dot)com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://storage.ie6countdown(dot)com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
</a>
</div>
<![endif]-->
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<link rel="stylesheet" href="css/ie.css">
<![endif]-->
</head>
<body>
<div class="main-bg">
<!-- Header -->
<header>
<div class="inner">
<h1 class="logo"><a href="home.html">AgroPlus - Agriculture company</a></h1>
<nav>
<ul class="sf-menu">
<li><a href="home.html">home</a></li>
<li><a href="products.html">products</a></li>
<li>
<a href="production.html">production</a>
</li>
<li><a href="pricing.html">pricing</a></li>
<li class="current"><a href="contacts.html">contacts</a></li>
</ul>
</nav>
<div class="clear"></div>
</div>
</header>
<!-- Content -->
<section id="content"><div class="ic">More Website Templates (at) TemplateMonster(dot)com. July 16, 2012!</div>
<div class="container_24">
<div class="wrapper">
<div class="grid_24 content-bg">
<div class="wrapper">
<article class="grid_6 suffix_1 prefix_1 alpha">
<h2>Contact info:</h2>
<p class="p1">
<strong class="str-2">
AgroPlus
</strong>
<dl class="adress">
<dt>8901 Marmora Road, Glasgow, D04 89GR</dt>
<dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
<dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
<dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
</dl>
<dl class="adress">
<dt>9863 Mill Road, Cambridge, MG09 99HT</dt>
<dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
<dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
<dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
</dl>
</p>
</article>
<article class="grid_15 suffix_1 omega">
<h2>Contact form:</h2>
<form id="contact-form" method="post" action="contacts.php">
<fieldset>
<label for="name">
<span>Name:</span>
<input type="text" name="name">
</label>
<label for='email'>
<span>Email:</span>
<input type="text" name="email">
</label>
<label for="message">
<span>Message:</span>
<textarea name="message"></textarea>
</label>
<div class="btns">
<a class="button" onClick="document.getElementById('contact-form').reset()">Clear</a>
<a class="button" onClick="document.getElementById('contact-form').submit()">Send</a>
</div>
</fieldset>
</form>
</article>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container_24">
<div class="wrapper">
<div class="grid_24 footer-bg">
<div class="hr-border-2"></div>
<div class="wrapper">
<div class="grid_7 suffix_1 prefix_1 alpha">
<div class="copyright">
© 2012 <strong class="footer-logo">AgroPlus</strong>
<div>Website Template by <a href="http://www.templatemonster(dot)com" target="_blank" rel="nofollow">www.templatemonster(dot)com</a></div>
</div>
</div>
<div class="grid_4">
<h5 class="heading-1">Archives:</h5>
<ul class="footer-list">
<li><a href="#">October 2012</a></li>
<li><a href="#">September 2012</a></li>
<li><a href="#">August 2012</a></li>
<li><a href="#">July 2012</a></li>
</ul>
</div>
<div class="grid_4">
<h5 class="heading-1">Links:</h5>
<ul class="footer-list">
<li><a href="#">Documentation</a></li>
<li><a href="#">Plugins</a></li>
<li><a href="#">Suggest Ideas</a></li>
<li><a href="#">Support Forum</a></li>
</ul>
</div>
<div class="grid_4">
<h5 class="heading-1">Support:</h5>
<ul class="footer-list">
<li><a href="#">Special Proposition</a></li>
<li><a href="#">Free Phone</a></li>
<li><a href="#">Solutions</a></li>
</ul>
</div>
<div class="grid_2 suffix_1 omega">
<ul class="social-list">
<li><a href="#"><img src="images/social-icon-1.png" alt=""></a></li>
<li><a href="#"><img src="images/social-icon-2.png" alt=""></a></li>
<li><a href="#"><img src="images/social-icon-3.png" alt=""></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>
<html lang="en">
<head>
<title>Contact us</title>
<meta charset="utf-8">
<meta name="description" content="Your description">
<meta name="keywords" content="Your keywords">
<meta name="author" content="Your name">
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/superfish.js"></script>
<script src="js/jquery.easing.1.3.js"></script>
<script src="js/tms-0.4.1.js"></script>
<script src="js/slider.js"></script>
<!--[if lt IE 8]>
<div style=' clear: both; text-align:center; position: relative;'>
<a href="http://windows.microsoft(dot)com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
<img src="http://storage.ie6countdown(dot)com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
</a>
</div>
<![endif]-->
<!--[if lt IE 9]>
<script src="js/html5.js"></script>
<link rel="stylesheet" href="css/ie.css">
<![endif]-->
</head>
<body>
<div class="main-bg">
<!-- Header -->
<header>
<div class="inner">
<h1 class="logo"><a href="home.html">AgroPlus - Agriculture company</a></h1>
<nav>
<ul class="sf-menu">
<li><a href="home.html">home</a></li>
<li><a href="products.html">products</a></li>
<li>
<a href="production.html">production</a>
</li>
<li><a href="pricing.html">pricing</a></li>
<li class="current"><a href="contacts.html">contacts</a></li>
</ul>
</nav>
<div class="clear"></div>
</div>
</header>
<!-- Content -->
<section id="content"><div class="ic">More Website Templates (at) TemplateMonster(dot)com. July 16, 2012!</div>
<div class="container_24">
<div class="wrapper">
<div class="grid_24 content-bg">
<div class="wrapper">
<article class="grid_6 suffix_1 prefix_1 alpha">
<h2>Contact info:</h2>
<p class="p1">
<strong class="str-2">
AgroPlus
</strong>
<dl class="adress">
<dt>8901 Marmora Road, Glasgow, D04 89GR</dt>
<dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
<dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
<dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
</dl>
<dl class="adress">
<dt>9863 Mill Road, Cambridge, MG09 99HT</dt>
<dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
<dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
<dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
</dl>
</p>
</article>
<article class="grid_15 suffix_1 omega">
<h2>Contact form:</h2>
<form id="contact-form" method="post" action="contacts.php">
<fieldset>
<label for="name">
<span>Name:</span>
<input type="text" name="name">
</label>
<label for='email'>
<span>Email:</span>
<input type="text" name="email">
</label>
<label for="message">
<span>Message:</span>
<textarea name="message"></textarea>
</label>
<div class="btns">
<a class="button" onClick="document.getElementById('contact-form').reset()">Clear</a>
<a class="button" onClick="document.getElementById('contact-form').submit()">Send</a>
</div>
</fieldset>
</form>
</article>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer>
<div class="container_24">
<div class="wrapper">
<div class="grid_24 footer-bg">
<div class="hr-border-2"></div>
<div class="wrapper">
<div class="grid_7 suffix_1 prefix_1 alpha">
<div class="copyright">
© 2012 <strong class="footer-logo">AgroPlus</strong>
<div>Website Template by <a href="http://www.templatemonster(dot)com" target="_blank" rel="nofollow">www.templatemonster(dot)com</a></div>
</div>
</div>
<div class="grid_4">
<h5 class="heading-1">Archives:</h5>
<ul class="footer-list">
<li><a href="#">October 2012</a></li>
<li><a href="#">September 2012</a></li>
<li><a href="#">August 2012</a></li>
<li><a href="#">July 2012</a></li>
</ul>
</div>
<div class="grid_4">
<h5 class="heading-1">Links:</h5>
<ul class="footer-list">
<li><a href="#">Documentation</a></li>
<li><a href="#">Plugins</a></li>
<li><a href="#">Suggest Ideas</a></li>
<li><a href="#">Support Forum</a></li>
</ul>
</div>
<div class="grid_4">
<h5 class="heading-1">Support:</h5>
<ul class="footer-list">
<li><a href="#">Special Proposition</a></li>
<li><a href="#">Free Phone</a></li>
<li><a href="#">Solutions</a></li>
</ul>
</div>
<div class="grid_2 suffix_1 omega">
<ul class="social-list">
<li><a href="#"><img src="images/social-icon-1.png" alt=""></a></li>
<li><a href="#"><img src="images/social-icon-2.png" alt=""></a></li>
<li><a href="#"><img src="images/social-icon-3.png" alt=""></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</footer>
</div>
</body>
</html>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Contact us</title>
- <meta charset="utf-8">
- <meta name="description" content="Your description">
- <meta name="keywords" content="Your keywords">
- <meta name="author" content="Your name">
- <link rel="stylesheet" href="css/style.css">
- <script src="js/jquery-1.7.1.min.js"></script>
- <script src="js/superfish.js"></script>
- <script src="js/jquery.easing.1.3.js"></script>
- <script src="js/tms-0.4.1.js"></script>
- <script src="js/slider.js"></script>
- <!--[if lt IE 8]>
- <div style=' clear: both; text-align:center; position: relative;'>
- <a href="http://windows.microsoft(dot)com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
- <img src="http://storage.ie6countdown(dot)com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
- </a>
- </div>
- <![endif]-->
- <!--[if lt IE 9]>
- <script src="js/html5.js"></script>
- <link rel="stylesheet" href="css/ie.css">
- <![endif]-->
- </head>
- <body>
- <div class="main-bg">
- <!-- Header -->
- <header>
- <div class="inner">
- <h1 class="logo"><a href="home.html">AgroPlus - Agriculture company</a></h1>
- <nav>
- <ul class="sf-menu">
- <li><a href="home.html">home</a></li>
- <li><a href="products.html">products</a></li>
- <li>
- <a href="production.html">production</a>
- </li>
- <li><a href="pricing.html">pricing</a></li>
- <li class="current"><a href="contacts.html">contacts</a></li>
- </ul>
- </nav>
- <div class="clear"></div>
- </div>
- </header>
- <!-- Content -->
- <section id="content"><div class="ic">More Website Templates (at) TemplateMonster(dot)com. July 16, 2012!</div>
- <div class="container_24">
- <div class="wrapper">
- <div class="grid_24 content-bg">
- <div class="wrapper">
- <article class="grid_6 suffix_1 prefix_1 alpha">
- <h2>Contact info:</h2>
- <p class="p1">
- <strong class="str-2">
- AgroPlus
- </strong>
- <dl class="adress">
- <dt>8901 Marmora Road, Glasgow, D04 89GR</dt>
- <dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
- <dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
- <dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
- </dl>
- <dl class="adress">
- <dt>9863 Mill Road, Cambridge, MG09 99HT</dt>
- <dd><span>Telephone:</span><b>+1 959 603 6035</b></dd>
- <dd><span>Fax:</span><b>+1 504 889 9898</b></dd>
- <dd><span>Email:</span><a href="#">mail(at)thomsander(dot)com</a></dd>
- </dl>
- </p>
- </article>
- <article class="grid_15 suffix_1 omega">
- <h2>Contact form:</h2>
- <form id="contact-form" method="post" action="contacts.php">
- <fieldset>
- <label for="name">
- <span>Name:</span>
- <input type="text" name="name">
- </label>
- <label for='email'>
- <span>Email:</span>
- <input type="text" name="email">
- </label>
- <label for="message">
- <span>Message:</span>
- <textarea name="message"></textarea>
- </label>
- <div class="btns">
- <a class="button" onClick="document.getElementById('contact-form').reset()">Clear</a>
- <a class="button" onClick="document.getElementById('contact-form').submit()">Send</a>
- </div>
- </fieldset>
- </form>
- </article>
- </div>
- </div>
- </div>
- </div>
- </section>
- <!-- Footer -->
- <footer>
- <div class="container_24">
- <div class="wrapper">
- <div class="grid_24 footer-bg">
- <div class="hr-border-2"></div>
- <div class="wrapper">
- <div class="grid_7 suffix_1 prefix_1 alpha">
- <div class="copyright">
- © 2012 <strong class="footer-logo">AgroPlus</strong>
- <div>Website Template by <a href="http://www.templatemonster(dot)com" target="_blank" rel="nofollow">www.templatemonster(dot)com</a></div>
- </div>
- </div>
- <div class="grid_4">
- <h5 class="heading-1">Archives:</h5>
- <ul class="footer-list">
- <li><a href="#">October 2012</a></li>
- <li><a href="#">September 2012</a></li>
- <li><a href="#">August 2012</a></li>
- <li><a href="#">July 2012</a></li>
- </ul>
- </div>
- <div class="grid_4">
- <h5 class="heading-1">Links:</h5>
- <ul class="footer-list">
- <li><a href="#">Documentation</a></li>
- <li><a href="#">Plugins</a></li>
- <li><a href="#">Suggest Ideas</a></li>
- <li><a href="#">Support Forum</a></li>
- </ul>
- </div>
- <div class="grid_4">
- <h5 class="heading-1">Support:</h5>
- <ul class="footer-list">
- <li><a href="#">Special Proposition</a></li>
- <li><a href="#">Free Phone</a></li>
- <li><a href="#">Solutions</a></li>
- </ul>
- </div>
- <div class="grid_2 suffix_1 omega">
- <ul class="social-list">
- <li><a href="#"><img src="images/social-icon-1.png" alt=""></a></li>
- <li><a href="#"><img src="images/social-icon-2.png" alt=""></a></li>
- <li><a href="#"><img src="images/social-icon-3.png" alt=""></a></li>
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- </footer>
- </div>
- </body>
- </html>
- ScottG
- Proficient


- Registrado: Jul 06, 2010
- Mensajes: 261
- Status: Offline
Me parece que el PHP tiene errores
PHP Código: [ Select ]
<?php
$myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {
// Handle POST Errors Here
} else {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$to = $myemail;
$subject = "$name";
$email_body = "You have received a new message.".
" Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contacts.html');
}
?>
$myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {
// Handle POST Errors Here
} else {
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$to = $myemail;
$subject = "$name";
$email_body = "You have received a new message.".
" Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
$headers = "From: $myemail\n";
$headers .= "Reply-To: $email";
mail($to,$subject,$email_body,$headers);
//redirect to the 'thank you' page
header('Location: contacts.html');
}
?>
- <?php
- $myemail = 'info(at)purestherbs(dot)com';//<-----Put Your email address here.
- if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['message'])) {
- // Handle POST Errors Here
- } else {
- $name = $_POST['name'];
- $email = $_POST['email'];
- $message = $_POST['message'];
- $to = $myemail;
- $subject = "$name";
- $email_body = "You have received a new message.".
- " Here are the details:\n Name: $name \n Email: $email \n Message \n $message";
- $headers = "From: $myemail\n";
- $headers .= "Reply-To: $email";
- mail($to,$subject,$email_body,$headers);
- //redirect to the 'thank you' page
- header('Location: contacts.html');
- }
- ?>
Página 1 de 1
Para responder a este tema que necesita para ingresar o registrarse. Es gratis.
Publicar Información
- Total de mensajes en este tema: 6 mensajes
- Usuarios navegando por este Foro: No hay usuarios registrados visitando el Foro y 228 invitados
- No puede abrir nuevos temas en este Foro
- No puede responder a temas en este Foro
- No puede editar sus mensajes en este Foro
- No puede borrar sus mensajes en este Foro
- No puede enviar adjuntos en este Foro
