Salve ho un problema con il seguente codice di un form
il problema è che non riesco a modificare la data; mi rimane sempre quella ma se io la voglio cambiare come devo fare??Codice:<?php include("../config.php"); $obj=new sast1com(); $obj->connessione(); $cliente=$_GET['cliente']; if(strlen($cliente) != 0) { $separa = explode(" ", $cliente); $cognome=$separa [0]; $pippo=strstr($cliente, " " ); $nome = substr($pippo, 1); if((strlen($cognome) > 0 && strlen($nome) > 0 )|| $nome != NULL) { $dati=mysql_query("select count(id) from clienti where cognome like '%$cognome%' and nome like '%$nome%'"); $array=mysql_fetch_array($dati); $num =$array[0]; if ($num == 1) { $dati=mysql_query("select * from clienti where cognome like '%$cognome%' and nome like '%$nome%'"); $array=mysql_fetch_array($dati); $id=$array['id']; $dati2=mysql_query("select max(id1) from schede "); $array2=mysql_fetch_array($dati2); $num_id=$array2[0]; $id1= $num_id +1; ?> <h2>Scheda N° <strong><? echo"".$id1.""; ?></strong> </h2><br/> <form name="form" method="post" action="inserimento_dati.php"> <table style="width:100%"> <tr> <td></td> <td><input type="hidden" name="id1" size="20" value="<? echo"".$id1.""; ?>"> </td> </tr> <tr> <td></td> <td><input type="hidden" name="id" size="20" value="<? echo"".$id.""; ?>"> </td> </tr> <tr> <td>Data: </td> <td><input type="date" name="data" readonly="readonly" value="<?php echo date("d/m/20y", time ()); ?>"></td> </tr> <tr></tr> <tr> <td>Durata (settimane): </td> <td> <select size="1" name="settimane"> <?php for($io=1; $io<=20; $io++){ echo "<option value=\"$io\">".$io."</option>";} ?> </select> </td> </tr> <tr></tr> <tr> <td>Livello: </td> <td> <select size="1" name="livello"> <option value="">Seleziona</option> <option value="base">Base</option> <option value="intermedio">Intermedio</option> <option value="avanzato">Avanzato</option> </select> </td> </tr> <tr></tr> <tr> <td>Obiettivo: </td> <td> <select size="1" name="obiettivo"> <option value="">Seleziona</option> <option value="dimagrimento">Dimagrimento</option> <option value="massa">Massa</option> <option value="tonificazione">Tonificazione</option> <option value="definizione">Definizione</option> <option value="definizione">Schede precompilate sugli obiettivi</option> </select> </td> </tr> <tr></tr> </table> <hr /> <br /><br /> <input type="submit" name="submit" value="Inserisci"> </form> <?php } else echo"<strong>Attenzione! Utente inesistente</strong>"; } else echo"<strong>Inserisci un nome corretto</strong>"; } else echo"<strong>Nessun cliente inserito</strong>"; ?>

LinkBack URL
About LinkBacks


