How to disable sections of a webpage?

I work on a website which has free subscribers and paying subscribers.

if a user is a free subscriber than $_SESSION[‘sub’] = 0
if a user is a paying subscriber than $_SESSION[‘sub’] = 1
Example 1

Here is a menu:

 <div class="dropdown-content">
				  <a href="includes/update_menu_order.php?mo=1&&
							u='.$url.'">A B C &#10506;</a>
	              <a href="includes/update_menu_order.php?mo=2&&
							u='.$url.'">A B C &#10507;</a>
		          <a href="includes/update_menu_order.php?mo=3&&
							u='.$url.'">profit &#10506;</a>
		          <a href="includes/update_menu_order.php?mo=4&&
							u='.$url.'">profit &#10507;</a>
				  <a href="includes/update_menu_order.php?mo=5&&
							u='.$url.'">Trades &#10506;</a>
		          <a href="includes/update_menu_order.php?mo=6&&
							u='.$url.'">Trades &#10507;</a>
               </div>

I want it to be displayed to all users.

I want it to funstion when used by paying subscribers only .
When a free subscriber will try to use it- it will not function.

example 2
I have an HTML form. it can be downloaded here
filter_form.html (3.8 KB)

It had 3 divs assigned with unique ID
div id=“periods”
div id=“days”
div id=“intraday”

I want that the section in div id=“periods” will be functional for all users.
The sections in the 2 other divs (div id=“days” & div id=“intraday”)
will be displayed to all users but will be functional for paying subscribers only.

I thought I will use a PHP if statement in the 2 last sections
if( $_SESSION[‘sub’] = 1){
echo the existing code or include a file with that code
}
In that case, how will the code for free subscribers will be?
should I insert a screenshot of the section ?

(I intend to give the disabled sections a unique class and display a message on hover useng JQuery)

What should I do with the form code.
What can I change / remove so that it will not function and won’t issue an error ?

should the code in the menu

<a href="includes/update_menu_order.php?mo=4&&
							u='.$url.'">profit &#10507;</a>
``` be
 ` <a href="#'">profit &#10507;</a>`

I want that the code could not be manipulated ustng dev tools or by other means

The code for every page must enforce what the current user can see or do on that page. The code for the page that outputs the menu or the form must only output what you want the current user to see. The code for includes/update_menu_order.php and includes/action_page.php must also enforce what the current user can see or do on those pages.

Why you do want to display things that a non-paying user cannot access? Can you imagine what this forum would look like and how confusing it would be if it displayed all the links/forms to everyone that the elevated members, moderators, and administrators can access?

For the menu or the form, for an entry to do nothing, you would not output the markup for the <a></a> tag or for form fields, and just output the text.

Next, you should NOT store user status/permission in session variables, such as the ‘sub’ value. You should query on each page request to get user data like this so that any change to the data will take effect on the very next page request after the data gets changed. By storing it in a session variable, the user must log out and back in again for a change to take effect.

Lastly, the for=‘…’ attribute in a label tag is not how you are using it. Since you are putting the label around the field it corresponds to, you do not need the for=‘…’ attributes at all.