Ciao a tutti,
ho già postato nella sezione JS a questo link http://forum.html.it/forum/showthrea...readid=1454823
ma non ho risolto...
Sto utilizzando un datepicker (javascript.html.it/script/vedi/5224/datepicker-in-stile-vista/) in un formulario che poi mi verrà inviato automaticamente con php alla mia casella di posta.
Tutto va bene tranne che invece di visualizzare la data (nella email) mi visualizza una serie di numeri che non riesco a interpretare, invece della data selezionata sul sito.
Nel campo della pagina, dopo che l'utente ha selezionato la data, la visualizzazione è corretta (giorno-mese-anno) ma nella email mi trovo una cosa del genere:
Contenuto del modulo:
nome: nome
cognome: cognome
email: mail
telefono: tel
entrydate: 1302000813
goingoutdate: 1302692013
il codice del php che ho creato è:
ho provato anche a mettere var_dump al posto di stripslashes, in ENTRYDATE e GOINGOUTDATE, che sono le due caselle di input (type="text") dove ci sono i datepicker.codice:<?php // INDIRIZZO DEL DESTINATARIO DELLA MAIL $to = "mia@email.com"; // OGGETTO DELLA MAIL $subject = "Oggetto"; // COSTRUZIONE DEL CORPO DEL MESSAGGIO $body = "Contenuto del modulo:\n\n"; $body .= "nome: " . trim(stripslashes($_POST["nome"])) . "\n"; $body .= "cognome: " . trim(stripslashes($_POST["cognome"])) . "\n"; $body .= "email: " . trim(stripslashes($_POST["email"])) . "\n"; $body .= "telefono: " . trim(stripslashes($_POST["telefono"])) . "\n"; $body .= "entrydate: " . trim(stripslashes($_POST["entrydate"])) . "\n"; $body .= "goingoutdate: " . trim(stripslashes($_POST["goingoutdate"])) . "\n"; $body .= "scrivici: " . trim(stripslashes($_POST["scrivici"])) . "\n"; // INTESTAZIONI SUPPLEMENTARI $headers = "From: Reservation"; // INVIO DELLA MAIL if(@mail($to, $subject, $body, $headers)) { echo "Your email has been sent correctly. Thank you!"; } else { echo "There was a problem while sending the mail. Please contact us. Thank you!"; } ?>
In questo modo ricevo un errore a schermo e nella mail che arriva i campi delle due date sono vuoti.
Come ne esco??
Grazie mille a chiunque possa aiutarmi!