Ver Mensaje Individual
  #8 (permalink)  
Antiguo 03/12/2009, 10:24
c0c
 
Fecha de Ingreso: octubre-2004
Mensajes: 38
Antigüedad: 19 años, 7 meses
Puntos: 0
Respuesta: Funcion mail desobediente.

Creeis que deberia ser asi? Lo siento, me siento muy torpe y no logro hacerlo funcionar.
Código PHP:
<body>
<?php
$submit
=$_POST['submit'];
$subject=$_POST['subject'];
$body=$_POST['body'];
$to=$_POST['to'];

$nombre=$_POST['nombre'];
$horario=$_POST['horario'];
$diadescanso=$_POST['diadescanso'];


if(isset(
$submit)):
    
$to "[email protected]";
    
$subject "Informacion para el sitio web";
    
$body "un usuario ha introducido daos en el sitio web\n";
    
    
$body .= "Nuevo lugar añadido\n\n";
    
$body .= $nombre;
    
$body .= $horario;
    
$body .= $diadescanso;

    
    
mail($to$subject$body);
    print(
"<h2>Gracias por enviar los datos</h2>");
else:
?>
<form action="index.php" method="post">...</form>
 
<?
endif;
?>
Muchas gracias por vuestra ayuda