please need help html form auto ip fill
<form action='konkursas.php' method='post'>
<p>El. pašto adresas</p><input type='email' title="Čia turėtų būti jūsų email." name ='nail' size= '30'/>
<input type='ip' title="jusu ip." name ='autofillip' size= '30'/>
<br />
<br />
<input type='submit' name='submit' value='OK'/>
<br />
</form>
php file
<?php
if (isset($_POST['submit'])) {
$file = fopen('konkursas.txt','a+');
$email = $_POST['nail'];
$fmail = $email.PHP_EOL;
fwrite($file,$fmail);
fclose($file);
print_r(error_get_last());
header("Location: http://www.mypage.com") ;
}
?>
Please help :)