QUOTE(CharlesEF @ Jan 4 2020, 01:57 AM)

This is how I would approach this:
Use PHP 'file_get_contents' and 'file_put_contents' to save the number of users that have registered (1 thru 25). No database needed.
When the login page is loading use that file to determine if the login screen should be shown (if less than 25) or an error message because 25 users have already registered.
If the login screen is shown and the user registers than you need to update the file to show new users registered count.
I can't offer anymore until you show some actual code.
Thank you Charles Ji
With the following, I got solution for my issue.
<?php
$link = mysqli_connect("localhost","root","");
mysqli_select_db($link,"school");
//submit1 = FOR INSERTING RECORDS
if(isset($_POST['submit1']))
{
$id= $_POST['student_id'];
$message1= "Record Existed!!!";
$message2= "Record added successfully";
$check=mysqli_query($link,"select * from students where id='$id'");
$checkrows=mysqli_num_rows($check);
if($checkrows>0) {
echo "<script type='text/javascript'>alert('$message1');</script>";
} else {
$q= "INSERT INTO `dance_programme` (std_id) values ('$id')";
$query= mysqli_query($link,$q);
echo "<script type='text/javascript'>alert('$message2');</script>";
mysqli_close($link); // Closing Connection with Server
}
};
?>
Thank you