Originariamente inviato da smile21
Ho provato tutto ok, ora creo (sempre se mi ricordo) il reindirizzamento verso un altra pagina e modifico i campi
che dire, con grande invidia, grazie!!!!!!!!!
ciao, non esito a chiedere, ho sistemato il form secondo le mie esigente, sembra tutto ok, ma non mi memorizza questa stringa:
codice:
$giocatori = strip_tags(addslashes($_POST['element_8_1']." ".$_POST['element_8_2'] ." ".$_POST['element_8_3']." ".$_POST['element_8_4'] ));
non riesco a capire (tanto per cambiare) dove è l'errore.
grazie ancora e buona serata
codice:
<?php if (isset($_POST['element_1_1']) && isset($_POST['element_1_2']) && isset($_POST['element_1_3']) && isset($_POST['element_3']) && isset($_POST['element_4_1']) && isset($_POST['element_5'])) { $nome = strip_tags(addslashes($_POST['element_4_1']." ".$_POST['element_4_2'])); $date = (int) $_POST['element_1_1'] . "/".(int) $_POST['element_1_2'] . "/".(int) $_POST['element_1_3']; $Time = strip_tags(addslashes($_POST['element_7_1']." ".$_POST['element_7_2'] )); $email = strip_tags(addslashes($_POST['element_3'])); $club = strip_tags(addslashes($_POST['element_5'])); $giocatori = strip_tags(addslashes($_POST['element_8_1']." ".$_POST['element_8_2'] ." ".$_POST['element_8_3']." ".$_POST['element_8_4'] )); $telefono = strip_tags(addslashes($_POST['element_9'])); $to = "xxxx@xxxxx"; $subject = "Prenotazione"; $body = " Nome E Cognome : ".$nome." \n arrivo : ".$date." \n Ora : ".$Time." \n Email : ".$email." \n squadra : ".$club." \n Quanti giocatori : ".$giocatori." \n Telefono : ".$telefono." \n "; $headers = "From: $to \n "; if(mail($to, $subject, $body, $headers)) { //modificate il messaggio a vostro piacere echo ("Mail inviata con successo"); } //nel caso ci fossero problemi else { echo ("Si è verificato un errore durante l'invio."); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Untitled Form</title> <link rel="stylesheet" type="text/css" href="view.css" media="all"> <script type="text/javascript" src="view.js"></script> <script type="text/javascript" src="calendar.js"></script> </head> <body id="main_body" > [img]top.png[/img] <div id="form_container"> <h1><a>Untitled Form</a></h1> <form id="form_399422" class="appnitro" method="post" action=""> <div class="form_description"> <h2>Untitled Form</h2>
This is your form description. Click here to edit.</p> </div> <ul > <li id="li_4" > <label class="description" for="element_4">Nome e Cognome </label> <span> <input id="element_4_1" name= "element_4_1" class="element text" maxlength="255" size="8" value=""/> <label>First</label> </span> <span> <input id="element_4_2" name= "element_4_2" class="element text" maxlength="255" size="14" value=""/> <label>Last</label> </span><p class="guidelines" id="guide_4">Please insert your name and surname /per favore scrivi il tuo nome che vale per la prenotazine</p> <li id="li_1" > <label class="description" for="element_1">Date </label> <span> <input id="element_1_1" name="element_1_1" class="element text" size="2" maxlength="2" value="" type="text"> / <label for="element_1_1">MM</label> </span> <span> <input id="element_1_2" name="element_1_2" class="element text" size="2" maxlength="2" value="" type="text"> / <label for="element_1_2">DD</label> </span> <span> <input id="element_1_3" name="element_1_3" class="element text" size="4" maxlength="4" value="" type="text"> <label for="element_1_3">YYYY</label> </span> <span id="calendar_1"> [img]calendar.gif[/img] </span> <script type="text/javascript"> Calendar.setup({ inputField : "element_1_3", baseField : "element_1", displayArea : "calendar_1", button : "cal_img_1", ifFormat : "%B %e, %Y", onSelect : selectDate }); </script> <li id="li_7" > <label class="description" for="element_7">Time </label> <span> <input id="element_7_1" name="element_7_1" class="element text " size="2" type="text" maxlength="2" value=""/> : <label>HH</label> </span> <span> <input id="element_7_2" name="element_7_2" class="element text " size="2" type="text" maxlength="2" value=""/> : <label>MM</label> </span> <li id="li_3" > <label class="description" for="element_3">Email </label> <div> <input id="element_3" name="element_3" class="element text medium" type="text" maxlength="255" value=""/> </div><p class="guidelines" id="guide_3">Please fill form using valid email address/inserisci un valido indirizzo, servirà per contattarti per eventuali problemi</p> <li id="li_5" > <label class="description" for="element_5">Golf Club </label> <div> <input id="element_5" name="element_5" class="element text medium" type="text" maxlength="255" value=""/> </div> <li id="li_8" > <label class="description" for="element_8">Quanti persone </label> <span> <input id="element_8_1" name="element_8" class="element radio" type="radio" value="1" /> <label class="choice" for="element_8_1">1</label> <input id="element_8_2" name="element_8" class="element radio" type="radio" value="2" checked="checked"/> <label class="choice" for="element_8_2">2</label> <input id="element_8_3" name="element_8" class="element radio" type="radio" value="3" /> <label class="choice" for="element_8_3">3</label> <input id="element_8_4" name="element_8" class="element radio" type="radio" value="4" /> <label class="choice" for="element_8_4">4</label> </span> <li id="li_9" > <label class="description" for="element_9">Telefono </label> <div> <input id="element_9" name="element_9" class="element text medium" type="text" maxlength="255" value=""/> </div> <li class="buttons"> <input type="hidden" name="form_id" value="399422" /> <input id="saveForm" class="button_text" type="submit" name="submit" value="Submit" /> [/list] </form> <div id="footer"> Generated by pForm </div> </div> [img]bottom.png[/img] </body> </html>