Aller au contenu

Grafityx

Membre
  • Compteur de contenus

    4
  • Inscrit(e) le

  • Dernière visite

Messages postés par Grafityx

  1. Comme ceci :


    <?php
    $TO = "xxx_AT_xxx.com";

    $FROM = "xxx_AT_xxx.com";

    $h = "From: " . $FROM;

    $subject = "Reservation";

    $message = "";

    while (list($key, $val) = each($HTTP_POST_VARS)) {
    $message .= "$key : $val\n";

    echo $key . " => " .$val . "<br />";

    }
    die('Fin');


    ?>

    Au lieu de tomber sur la page de confirmation de resa, je vois directement mon message dans le navigateur et je ne reçois pas d'email ...

  2. Ouuuppss désolé :smartass:

    Codes dans page reservation.htm

    <script type="text/javascript">
    <!--
    function verification(thisForm) {

    if(document.reservation.name.value == "") {
    alert("You forget your name");
    document.reservation.name.focus();
    return false;
    }
    else
    if(document.reservation.email.value == "") {
    alert("You forget your email address");
    document.reservation.email.focus();
    return false;
    }
    else
    if(document.reservation.email.value.indexOf('@') == -1) {
    alert("Please check your email address");
    document.reservation.email.focus();
    return false;
    }
    else
    if(document.reservation.country.value == "") {
    alert("You forget your country");
    document.reservation.country.focus();
    return false;
    }
    else
    if(document.reservation.date.value == "") {
    alert("You forget the date");
    document.reservation.date.focus();
    return false;
    }
    else
    if(document.reservation.nbperson.value == "") {
    alert("You forget the number of person");
    document.reservation.nbperson.focus();
    return false;
    }
    else
    return true;
    }

    //-->
    </script>



    <form name='reservation' action='formmail.php' method='post' onSubmit="return verification()">
    <body>

    <table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="95%"
    >
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>
    <td style='padding:0cm 0cm 0cm 0cm'><table class="MsoNormalTable" border="0" cellspacing="5" cellpadding="0" width="94%"
    >
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td colspan="4" valign="top" ><h2>Reservation</h2></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width="400" rowspan="12" valign="top" ></td>
    <td width="35" rowspan="12" valign="top" > </td>
    <td colspan="2" valign="top" ></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td width="106" valign="top" >
    <div align="left" >Name*</div></td>
    <td width="223" valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">

    <input type="text" name="name" size="20" />
    </font></b></div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Tel.</div></td>
    <td valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">
    <input type="text" name="tel" size="20" />
    </font></b></div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Email*</div></td>
    <td valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">
    <input name="email" type="text" id="email" value="" size="20" />
    </font></b></div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Country*</div></td>
    <td valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">
    <input type="text" name="country" size="20" />
    </font></b><br />
    </div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Date *</div></td>
    <td valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">
    <input type="text" name="date" size="08" />
    </font></b>(dd-mm-yy)</div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" >Time*</td>
    <td valign="top" ><select name="time" size="1" class="stylemenu" style="font-family: verdana; font-size:9">

    <option value="11:00 AM">11:00 AM</option>
    <option value="11:30 AM">11:30 AM</option>
    <option value="12:00 PM">12:00 PM</option>
    <option value="12:30 PM">12:30 PM</option>
    <option value="01:00 PM">01:00 PM</option>
    <option value="01:30 PM">01:30 PM</option>
    <option value="02:00 PM">02:00 PM</option>
    <option value="02:30 PM">02:30 PM</option>
    <option value="03:00 PM">03:00 PM</option>
    <option value="03:30 PM">03:30 PM</option>
    <option value="04:00 PM">04:00 PM</option>
    <option value="04:30 PM">04:30 PM</option>
    <option value="05:00 PM">05:00 PM</option>
    <option value="05:30 PM">05:30 PM</option>
    <option value="06:00 PM">06:00 PM</option>
    <option value="06:30 PM">06:30 PM</option>
    <option value="07:00 PM">07:00 PM</option>
    <option value="07:30 PM">07:30 PM</option>
    <option value="08:00 PM">08:00 PM</option>
    <option value="08:30 PM">08:30 PM</option>
    <option value="09:00 PM">09:00 PM</option>
    <option value="09:30 PM">09:30 PM</option>
    <option value="10:00 PM">10:00 PM</option>
    <option value="10:30 PM">10:30 PM</option>
    <option value="11:00 PM">11:00 PM</option>
    <option value="11:30 PM">11:30 PM</option>
    <option value="12:00 PM">12:00 PM</option>
    </select></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Number of person*</div></td>
    <td valign="top" ><div align="left"><b><font face="Verdana" size="1" color="#B30000">
    <input type="text" name="nbperson" size="2" />
    </font></b></div></td>
    </tr>

    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left">Specific requests :</div></td>
    <td valign="top" ><div align="left">
    <textarea name="requests" cols="25" rows="5" id="specific requests"></textarea>
    </div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left"></div></td>
    <td valign="top" ><div align="left"></div></td>
    </tr>
    <tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'>
    <td valign="top" ><div align="left"></div></td>
    <td valign="top" ><div align="left"><span style="margin-top: 10">
    <input type="submit" value="Send" style="color: #FFFFFF; border: 1px solid #FF5A00; background-color: #C0232B">
    </span><span style="margin-top: 10">
    <input type="reset" value="Reset" style="color: #FFFFFF; border: 1px solid #FF5A00; background-color: #C0232B" />
    </span></div></td>
    </tr>

    </table></td>
    </tr>
    </table>

    Mon fichier formmail.php (j'ai volontairement enlevé les adresses de contact)

    <?php
    $TO = "xxx_AT_xxx.com";

    $FROM = "xxx_AT_xxx.com";

    $h = "From: " . $FROM;

    $subject = "Reservation";

    $message = "";

    while (list($key, $val) = each($HTTP_POST_VARS)) {
    $message .= "$key : $val\n";
    }

    mail($TO, $subject, $message, $h);

    Header("Location: http://xxx.com/restaurant/confirm-resa.htm");

    ?>

  3. Bonjour à tous, j'ai un formulaire de contact sur mon site + une fonction vérif pour les champs vides et donc éviter de recevoir des emails vides (qui fonctionne sur tout les navigateurs) donc logiquement je devrai être tranquille :whistling: mais je reçois quand même parfois des emails vides ... :blush:

    Quelqu'un a t-il une idée ?

    Merci

×
×
  • Créer...