I have this in a PHP file
<?php session_start(); ?>
<?php $inscripcioncerrada = "inscripcioncerrada.php" ?>
<?php $inscripcionabierta = "inscripcionabierta.php" ?>
<?php $_SESSION['estadoInscripcion'] = $inscripcioncerrada ?>
in the pages to which I refer to $_SESSION['estadoInscripcion']
I have just started an include such that <?php include("periodoinscripcion.php"); ?>
which is what the file is called.
So all right.
Well, now what I want (I do not know if it is possible to do it) is to make a script to modify that variable $_SESSION['estadoInscripcion']
in the PHP file so that when the rest of the pages refer to it, the new value will appear.
That is to say, if for example the inscription is closed, that calling a script changes it to open ( $_SESSION['estadoInscripcion'] = $inscripcionabierta
) in the PHP. So all the pages that include it change the value.
How to do it?