grazie miille
ho pensato di fare cosi dimmi se giusto...
codice:
<?php
$mail=$_POST['mail'];
$nome=$_POST['nome'];
$telefono=$_POST['telefono'];
$mess=$_POST['mess'];
function mailtocliente($mail,$nome,$telefono,$mess) {
$error = '';
$fromname = $nome;
$fromaddress = $mail;
$destinatario = io@miosito.com';
$mailsubject = "Richiesta Informazioni";
$headers = "Wrom: UWLSZLKBRNVWWCUFPEGAUTFJMVRESKPNKMBIP
$headers.= "Return-Path: ".$fromaddress."\n";
$headers.= "Content-Type: text/html; charset=iso-8859-1";
$message = "Dati utente: $nome - Telefono: $telefono - E-mail: $mail - ha richiesto: $mess";
if(!mail($destinatario, $mailsubject, $message, $headers)) {
$error = "Errore (mailtocliente) : Impossibile inviare l' email";
}
else {
echo "Email inviata con successo!";
}
return $error;
}
?>
<html>
<head>
<meta http-equiv="Content-Style-Type" content="text/css">
......
<form name="form" method="post" action=mailtocliente($mail,$nome,$telefono,$mess)
come vedi ho messo tutto nella stessa pagina in modo che al click richiamo una funzione php ma è giusto richiamarla cosi?! :master: