Hi I have this PHP:
<?php
if(isset($_POST["nombre"]) && isset($_POST["localidad"]) &&
isset($_POST["mail"]) && isset($_POST["nombCreacion"]) &&
isset($_POST["imagen_txt"]) )
{
$nombre = $_REQUEST["nombre"];
$localidad = $_REQUEST["localidad"];
$email = $_REQUEST["mail"];
$nomCreacion = $_REQUEST["nombCreacion"];
$creacion = $_REQUEST["imagen_txt"];
$habilitar = 0;
$votos = 0;
$base = 'mydb';
$conexion = mysql_connect ( 'localhost' , 'root' , 'root' );
mysql_select_db ( $base , $conexion );
mysql_query ( "INSERT INTO fotografias
(nombre,localidad,email,nomCreacion,creacion,habilitar,votos) VALUES (
'$nombre' , '$localidad' , '$email' , '$nomCreacion' , '$creacion' ,
'$habilitar' , '$votos' )", $conexion);
$fecha = date("D-M-y H:i");
$mymail = "[email protected]";
$subject = "Contact Form"."<br>";
$contenido .= "Nombre y Apellido: ".$_POST["nombre"]."<br>";
$contenido .= "Localidad: ".$_POST["localidad"]."<br>";
$contenido .= "Mail de tus papas: ".$_POST["mail"]."<br>";
$contenido .= "Nombre de la creación:
".$_POST["nombCreacion"]."<br>";
$contenido .= "Foto: <a href='fotos/".$_POST["imagen_txt"]."'>
fotos/".$_POST["imagen_txt"]."</a><br>";
$contenido .= "Habilitar o Borrar creación: <a
href='admin/'>Administrador</a><br>";
$contenido .= "El mensaje se escribio el ".$fecha."<br>";
$header =
"From:".$_POST["mail"]."\nReply-To:".$_POST["mail"]."<br>";
$header .= "X-Mailer:PHP/".phpversion()."\n";
$header .= "Mime-Version: 1.0\n";
$header = "Content-Type: text/html; charset=utf-8\r\n";
mail($mymail, $subject, utf8_encode($contenido) ,$header);
echo 'exito=true';
}else{
echo "nada subio";
}
?>
I want to insert a JPG image ($creacion) with the ID (from the data base,
MEDIUMINT AUTOINCREMENT): 23image.jpg in the data base, and send the
information to a e-mail addres. How do I do that?
Thanks a lot,
+ _
// Emiliano Boragina _
// Diseño & Comunicación //////////////////
+ _
// [email protected] /
// 15 40 58 60 02 ///////////////////////////
+ _