using external php file in html form
<p>I am trying to create simple user registration form. I have an <code>index.html</code> file and a <code>register.php</code> file. When I click the submit button it goes to the <code>register.php</code> page, but nothing happens. There's no error or anything. I have some <code>echo</code> statements in <code>register.php</code> but they also don't work.</p>

<p>This is the code for <code>index.html</code>:</p>

<pre><code>&lt;form action="register.php" method="post"&gt;
&lt;table width="384" border="1" align="center"&gt;
&lt;? echo '&lt;tr&gt;&lt;td colspan="2"&gt;'.$final_report.'&lt;/td&gt;&lt;/tr&gt;';?&gt;
&lt;tr&gt;
&lt;td width="50%"&gt;Username:&lt;/td&gt;
&lt;td width="50%"&gt;&lt;label&gt;
  &lt;input name="username" type="text" id="username" size="30" /&gt;
&lt;/label&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Password:&lt;/td&gt;
  &lt;td&gt;&lt;input name="password" type="password" id="password" value="" size="30" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;Email:&lt;/td&gt;
  &lt;td&gt;&lt;input name="email" type="text" id="email" size="30" /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;td&gt;&amp;nbsp;&lt;/td&gt;
  &lt;td&gt;&lt;label&gt;
    &lt;input name="register" type="submit" id="register" value="Register" /&gt;
  &lt;/label&gt;&lt;/td&gt;
&lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;    
</code></pre>

<p>This is code for <code>register.php</code>: </p>

<pre><code>&lt;? 
include_once"config.php";
if(isset($_POST['register'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$memip = $_SERVER['REMOTE_ADDR'];
$date = date("d-m-Y");
if($username == NULL OR $password == NULL OR $email == NULL){
$final_report.= "Please complete the form below..";
}else{
if(strlen($username) &lt;= 3 || strlen($username) &gt;= 30){
$final_report.="Your username must be between 3 and 30 characters..";
}else{
$check_members = mysql_query("SELECT * FROM `members` WHERE `username` =    '$username'");   
if(mysql_num_rows($check_members) != 0){
$final_report.="The username is already in use!";  
}else{ 
if(strlen($password) &lt;= 6 || strlen($password) &gt;= 12){
$final_report.="Your password must be between 6 and 12 digits and characters..";
}else{
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$",         $email)){ 
$final_report.="Your email address was not valid..";
}else{
$create_member = mysql_query("INSERT INTO `members` (`id`,`username`, `password`,`email`, `ip`, `date`) 
VALUES('','$username','$password','$email','$memip','$date')"); 
$final_report.="Thank you for registering, you may login."; 
}}}}}}
?&gt;
</code></pre>

<p>Can anyone see the error?</p>
