使用Php在.text中编写表单输入

How do I duplicate form boxes and the codes in my php to "grab the newly added form boxes"? I'm planning to create 4 form boxes (email, password, contact, Bio) but I'm already stuck on the second one. codes:

<form action="#" method="post">
 <input type="text" name="email" class="emailSubmitSidebar" placeholder=" Your Email">
 <input type="text" name="password" class="password" placeholder="Password">
 <input type="submit" name="submit" class="submitButton">
</form>

<?php
if(isset($_POST["submit"]))
{

$fileHandle = fopen('info.txt', 'w+')
        OR die ("Can't open file
");
$email=$_POST["email"];
$password=$_POST["password"];
$result = fwrite ($fileHandle, $email, $password);
if ($result)
     {
         print '<script type="text/javascript">'; 
         print 'alert("Email added!")'; 
         print '</script>';  
    } else {
        print '<script type="text/javascript">'; 
        print 'alert("Email not added!")'; 
        print '</script>';  
    };
fclose($fileHandle);
}
?>

PHP code keeps failing, direct fix for this?

Change this line:

$result = fwrite ($fileHandle, $email."-".$password);

fwrite takes a single string a parameter, you can't pass two parameters