|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Feb 2002
Città: Roma
Messaggi: 3030
|
[PHP]: Aiuto disperato
Ciao ragazzi,
un mio amico ha un problema semplicissimo, per voi ![]() le mail che gli arrivano non riportano quanto viene scritto nei box della pagina contact http://www.viaggilusso.com/agenzia/contact.html lo stesso funziona su un altro server sicuramente dipende da un php nuova versione, montato sui server di godaddy cosa deve cambiare? <form action="http://www.viaggilusso.com/agenzia/buy.php" method=POST> <table width="100%" align="center" border="0" cellspacing="0" cellpadding="4"> <tr> <td width="50%" height="2">Privato o Azienda</td> <td align="right" width="50%" height="2"> <select name="type"> <option value="select">select</option> <option value="privato">privato</option> <option value="azienda">azienda</option> </select> </td> </tr> <tr> <td width="50%" height="2">Ragione del contatto </td> <td align="right" width="50%" height="2"> <input type=text name="date"></td> </tr> <tr> <td width="50%" height="2">Nome</td> <td align="right" width="50%" height="2"> <input type=text name="name"></td> </tr> <tr> <td width="50%" height="2">Tel.</td> <td align="right" width="50%" height="2"> <input type=text name="tel"></td> </tr> <tr> <td width="50%" height="2">E-mail</td> <td align="right" width="50%" height="2"> <input type=text name="email"></td> </tr> <tr> <td width="50%" height="2">Citta'</td> <td align="right" width="50%" height="2"> <input type=text name="address"></td> </tr> <tr> <td width="50%" height="2">Note aggiuntive </td> <td align="right" width="50%" height="2"><textarea name="notes"></textarea></td> </tr> <tr> <td width="50%" height="2"></td> <td width="50%" height="2" align="right"> <input name="item" type="hidden" value="contact"></td> </tr> <tr> <td height="2"> </td> <td align="right" height="2"> </td> </tr> <tr> <td height="2"> <input type="submit" name="Submit" value="Invia"></td> <td align="right" height="2"> </td> </tr> <tr> <td width="50%" height="2"></td> <td align="right" width="50%" height="2"></td> </tr> </table> </form> pagina di arrivo, buy.php nelle email si legge Form viaggi di lusso, category, type, date, etc, ma non leggo il testo che ho inserito nei boxes <?php $Testo = "---- Form Viaggi Lusso ----\n\n"; $Testo .= "Category : ".$HTTP_POST_VARS["category"]."\n"; $Testo .= "Type : ".$HTTP_POST_VARS["type"]."\n"; $Testo .= "Date : ".$HTTP_POST_VARS["date"]."\n"; $Testo .= "Name : ".$HTTP_POST_VARS["name"]."\n"; $Testo .= "Tel : ".$HTTP_POST_VARS["tel"]."\n"; $Testo .= "E-mail : ".$HTTP_POST_VARS["email"]."\n"; $Testo .= "Address : ".$HTTP_POST_VARS["address"]."\n"; $Testo .= "Notes : ".$HTTP_POST_VARS["notes"]."\n"; mail ("roby@romagift.com", "Form Viaggi Lusso ;-)", $Testo, "From: b2b@romagift.com\n" ); // print($Testo); ?> Grazie di cuore a tutti Ale Ultima modifica di Robby Naish : 21-04-2011 alle 10:00. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Iscritto dal: Nov 2005
Messaggi: 2775
|
Prova ad utilizzare $_POST invece di $HTTP_POST_VARS
|
![]() |
![]() |
![]() |
#3 |
Senior Member
Iscritto dal: Feb 2002
Città: Roma
Messaggi: 3030
|
Originamente era come hai scritto tu, po al cambio server non funzionava. Allora l'ha modificato come ho scritto sopra, ma niente.. non passa tutto quello digitato nel form
![]() grazie Ale |
![]() |
![]() |
![]() |
#4 |
Senior Member
Iscritto dal: Nov 2005
Messaggi: 2775
|
Quindi sul vecchio server la mail la inviava correttamente?
|
![]() |
![]() |
![]() |
#5 |
Senior Member
Iscritto dal: Feb 2002
Città: Roma
Messaggi: 3030
|
Allora, su hostedime che ha PHP 4.0 funziona bene
spostato su godaddy, che non si sa che PHP ha, non passa il testo digitato. La email arriva vuota, solo i testi dei campi fissi (nome, cognome etc etc) che cavolo puo essere? Grazie Ale |
![]() |
![]() |
![]() |
#6 |
Member
Iscritto dal: Apr 2011
Messaggi: 59
|
Per caso funziona se invece di $POST[] o $HTTP_POST_VARS[] ci metti direttamente il nome della variabile?
Tipo così: Codice:
<?php $Testo = "---- Form Viaggi Lusso ----\n\n"; $Testo .= "Category : ".$category."\n"; $Testo .= "Type : ".$type."\n"; $Testo .= "Date : ".$date."\n"; ... mail ("roby@romagift.com", "Form Viaggi Lusso ;-)", $Testo, "From: b2b@romagift.com\n" ); // print($Testo); ?> ![]() |
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:07.