Hello everyone. There is a problem. It is necessary to limit the number of adding users with a binding to the database.
Adding users is implemented on the site. It is necessary that the client, when adding a user, be limited to the number of additions through the rank.
The site implemented the ranks "Mini, Economy, Standard, Partner, Sponsor, General Sponsor"
Each rank must have a limit on adding a user. "Mini" has 3 pcs. "Economy" has 4 pcs. "Standard" has 5 pcs. "Partner" has 6 pcs. "Sponsor" has 8 pcs and "Gene Sponsor" has 10 pcs.
How to make the restriction be tied to the rank.
<div class="col-xs-12" style="display: flex;"> <a style="float:left;margin: 10px; " href="/kons.php?action=new_form& rowform=<?=$search?>" class="jsdelete_pers btn btn-warning btn-sm" >Add consultant</a><!--<span class="input-text" ><b style="font-size:18px;color:#fff;"><?=$row1['N']?></b></span> <span style="background: lightblue;height: 34px;font-size:22px;font-weight: bold;color: red;margin-left: 5px;width: 100%"> <?=htmlspecialchars($row1['ConsName'])?> </span> --> <?php $result444= mysql_query ("SELECT count(`DueCons`) as count,`DueCons` FROM `medsoft` where `N`=".$poisk." and `DueCons` like 'medsoft%'", $db) ; $rowcount= mysql_fetch_array($result444); ?>Hidden previously entered medsoft MedSoft-*: <?=$rowcount['count']?> PC. </div>
This is what the Rank table looks like
id rank Description 1 6 Mini 2 5 Economy 3 4 Standard 4 3 Partner 5 2 Sponsor 6 1 General Sponsor
- jquery : Ready plug-in for image cropping
- php : Symfony 5 form submit data issue