I have problem with mysql_close 
I dont understand why.
Are ther someone that have any proposal?

Thank for any help
Erik Gjertsen

Here is the code


$query = "SELECT usrid FROM users WHERE username";
 $result = @mysql_query ($query); //Run the query
  if (mysql_num_rows($result) == 0) { // Make the query
  $query = "INSERT INTO users (username, name, email, password, registration_date) 
VALUES
  ('$username', '$name', '$email', '$password', NOW() )";
  $result = @mysql_query ($query);
   if ($result) { // IF it ran OK
 
    // Send an email, if desired
    echo '<p><b>You have been registered!</b></P>';
    include("./footer.inc");
    exit();
   } else { // If it did not ron OK.
    $message = '<p>You cout not be registered due to a system error. We apologize for 
any inconvenience</p>';
   }
  } else {
  $message = '<p>That username is alredy taken.</p>';
  }
 mysql_close();
 
 
 } else {
  $message = '<p>Please try again.</p>';
 }
} // End of the main   submit conditional.

 // Print the error message if ther is one
 if (isset($message)) {
  echo '<font color="red">', $message, '</font>';
 )

Reply via email to