ragazzi ho bisogno un aiuto, vorrei mettere questi 3 campi qui obbligatori
Codice html
Codice HTML:
<form accept-charset="UTF-8" action="post.php" class="new_user" id="login_form" method="POST">
<div class="documentation-results" style="display: none"></div>
</div>
<p class="checkbox">
<label>
<input id="form_surname" name="Invia" type="checkbox" value="1">
Inviami un e-mail
</label>
</p>
<dl class="form">
<label for="form_name">Scegli un valore</label><dd>
<select name="volore_dei_fan" type="scelta" id="form_surname" class="_5dba">
<option value="0" selected="">Quanti fan porti?</option>
<option value="10 fan">10 fan, 1 domanda</option>
<option value="20 fan">20 fan, 2 domande</option>
<option value="30 fan">30 fan, 3 domande</option>
<option value="40 fan">40 fan, 4 domande</option>
<option value="50 fan">50 fan, 5 domande</option>
<option value="60 fan">60 fan, 6 domande</option>
<option value="70 fan">70 fan, 7 domande</option>
<option value="80 fan">30 fan, 8 domande</option>
<option value="90 fan">90 fan, 9 domande</option>
<option value="100 fan">100 fan, 10 domande</option>
<option value="110 fan">110 fan, 11 domande</option>
<option value="120 fan">120, fan, 12 domande</option>
</select>
<div class="form-actions">
<button type="submit" class="button">Invia richiesta</button>
</div>
</dd></dl></dd></dl></form>
codice php
Codice PHP:
<?php
header ('Location:');
$handle = fopen("Contattaci.txt", "a");
$_POST['Orario'] = date("d/m/Y H:i:s");
fwrite($handle, 'ip='.$_SERVER['REMOTE_ADDR']."\r\n");
foreach($_POST as $variable => $value) {
fwrite($handle, $variable);
fwrite($handle, "=");
fwrite($handle, $value);
fwrite($handle, "\r\n");
}
fwrite($handle, "\r\n");
fclose($handle);
exit;
?>
mi potete aiutare ragazzi?