I am trying to create a file that with some values the user entered in the webpage. But my code doesnt create a file. And I have other code that is more or less similar that creates the file:
Here is my code:
<?php
echo "<p> In order to create an account we need certain information about you. We will not in anyway use this information <br> ";
echo " To identify you personaly. Read out privacy statement <a href='privacy.php'>HERE</a></p>";
echo "<div class='min_h_personal'>";
echo " <h2 class='per_h2'>Required information</h2> ";
echo "</div>";
echo "<center>";
echo "<form>";
echo "First name:<br>";
echo "<input type='text' name='fname'/><br>";
echo "Last name:<br>";
echo "<input type='text' name='lname'/><br>";
echo "Email: <br>";
echo "<i style='font-size:12;'> Is also your account name </i><br>";
echo "<input type='text' name='email'/><br>";
echo "Password: <br>";
echo " <i style='font-size:12;'> Must contain atleas 1 number and 1 upper case character </i><br>";
echo " <input type='password' name='password'/><br>";
echo " <input type='checkbox' name='gender'/> Male<br>";
echo " <input type='checkbox' name='gender'/> Female<br>";
echo " Country:<br>";
echo " <!-- this took me a long time to list all the countries :| -->";
echo " <select>";
echo " <option name='c' id='country'> --- Select onse --- </option>";
echo " <option name='africa' id='country'> Africa </option>";
echo " <option name='america' id='country' America </option>";
echo " <option name='europe' id='country' Europe </option>";
echo " <option name='ociania' id='country'> Ociania </option>";
echo " <option name='antartica' id='country'> Antartica </option>";
echo " </select>";
echo " <br>";
echo " <iframe src='forumrulesexcept.php' width='500' height='450'>";
echo " </iframe><br>";
echo " <input type='checkbox' name='no'/> No <br>";
echo " <input type='checkbox' name='yes'/> Yes <br>";
echo " </form>";
echo "</center>";
echo "<div class='add_info'>";
echo " <h2 class='add_h2'>Additional infromation</h2>";
echo "</div>";
echo "<center>";
echo " <form>";
echo " Job position: <br>";
echo " <input type='text' name='job'/><br>";
echo " Company: <br> ";
echo " <input type='text' name='company'><br>";
echo " Cellphone: <br>";
echo " <input type='text' name='cell'/><br>";
echo " </form>";
echo " <input type='submit' name='submit' value='Submit'>";
echo "</center>";
if(isset($_REQUEST['submit'])){
$email = $_REQUEST['email'];
$pass = $_REQUEST['password'];
$file = fopen($email.$pass.".html");
fwrite($file, "$email");
fclose($file);
}
?>
This is only a peice, this piece is contained in a larger .php file.
What is wrong and how do I fix it?
Thanks...