Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/10/2013, 06:12
camilomascarell1987
 
Fecha de Ingreso: abril-2013
Mensajes: 39
Antigüedad: 11 años
Puntos: 0
cuerpo y mysql

php .$row_mail['nombre'];"\n".$row_mail['mail'];"\n".$row_mail['telefono'];"\n".$row_mail['numero'];"\n".$row_mail['fecha']; es muy error
Código PHP:
<?php require_once('Connections/word.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  if (
PHP_VERSION 6) {
    
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$colname_mail "-1";
if (isset(
$_GET['id'])) {
  
$colname_mail $_GET['id'];
}
mysql_select_db($database_word$word);
$query_mail sprintf("SELECT * FROM reservas WHERE id = %s"GetSQLValueString($colname_mail"int"));
$mail mysql_query($query_mail$word) or die(mysql_error());
$row_mail mysql_fetch_assoc($mail);
$totalRows_mail mysql_num_rows($mail);
?>
<? 
$destinatario 
"[email protected]"
$asunto "nombre"$row_mail['nombre'] ; 
$cuerpo "
<head>
<title>Documento sin título</title>
</head>

<body>


<h1>Hola amigos!</h1> 
<p>"
.$row_mail['nombre'];"\n".$row_mail['mail'];"\n".$row_mail['telefono'];"\n".$row_mail['numero'];"\n".$row_mail['fecha'];"
</p> 
</body> 
</html> 
"
;

//para el envío en formato HTML 
$headers "MIME-Version: 1.0\r\n"
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"

//dirección del remitente 
$headers .= "From: Miguel Angel Alvarez <[email protected]>\r\n"

//dirección de respuesta, si queremos que sea distinta que la del remitente 
$headers .= "Reply-To: [email protected]\r\n"


mail($destinatario,$asunto,$cuerpo,$headers
?>
</body>
</html>
<?php
mysql_free_result
($mail);
?>