<?php
include 'dbc.php';


$user_id=$_POST["user_id"];
$user_pass=$_POST["user_pass"];
$user_name=$_POST["user_name"];
$user_type=$_POST["user_type"];
$accno=$_POST["accno"];
$bankname=$_POST["bankname"];
$address=$_POST["address"];
$result = mysql_query("SELECT * FROM users");

$num_rows = mysql_num_rows($result);
if ($num_rows == 12)
{
echo "your school limit is over now";
}
else
{
$sql = "Insert into users (id,userid,userpwd,username,usertype,address,accno,bankname) values (null,'$user_id','$user_pass','$user_name','$user_type','$address','$accno','$bankname')";
mysql_query($sql) or die("Error : " . mysql_error());
echo "User Created Successfully";
}
?>
<a href="add_users.php"> Back </a>