Quantcast
Channel: Active questions tagged feedback+php - Stack Overflow
Viewing all articles
Browse latest Browse all 34

Sending via email info from a contact form with PHP

$
0
0

Firstly I would like to say I'm just a very newbie in php.

I have this simple php and as it is at the moment, when it sends the info it appears a horrible "Ok" message.

could you help me improving this php with: -better code (is it ok? could it be better?) -I would like to add a fancier answer (like in a box or something similar) in order to advice the user that his message has been sended.

Another thing is I am not sure this is working. I have xampp installed and locally it is not working. I also tried completing the form with all the files uploaded to the server and I´m still waiting for em....the miracle of the mail arriving to my inbox? =S Maybe I did something wrong?

<?php
if(isset($_POST["nombre"]) && isset($_POST["email"]) && isset($_POST["consulta"])){
$mymail = "myemail@gmail.com";
$subject = "Consulta";
$contenido = ":: Nombre: ". $_POST["nombre"]."\n";
$contenido .= ":: E-mail: ". $_POST["email"]."\n";
$contenido .= ":: Escribiò el siguiente mensaje: ". $_POST["consulta"]."\n";

$header = "From:".$_POST["email"]."\n"; 

mail($mymail, $subject, utf8_decode($contenido));*/
echo "&estatus=ok&";
}?>

Thanks in advance for your help! regards,


Viewing all articles
Browse latest Browse all 34

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>