3
I have a page that receives monthly newsletters, to display the month desired by the user do the following:
<a href="?mes=ago2015" class="list-group-item
<?=($mes=='ago2015')?'active':''?>" id="ago2015">Agosto / 2015</a>
And call the referring page with a include:
$mes = empty($_GET['mes'])?'infos':$_GET['mes'];
case 'ago2015':
include('infos/agosto2015.php');
break;
Someone suggests some better way to do it?
For every month of every year you do it?
– Jorge B.
@Jorgeb. until a moment has 3 months, but in theory would be, so I want to change...
– Bia
Bia the information of each month is in a database?
– Jorge B.
@Jorgeb. No, it’s pages.
– Bia
So I’m not seeing a better way to do that. Let’s see if anyone has another idea.
– Jorge B.
I don’t see any other way to do this more optimally. If you were in a database it would be another story, but since you’re not, this is a good way to do it.
– Diego Souza
@Zoom I also like Flash, but changing the focus... These pages are made in HTML, in the right hand, if you did something more intent as a registration and put in the bank, would you solve this question? Because the more informative you insert, the bigger and "bad" this code would be.
– Bia
That’s cool! The episode yesterday was top. So surely this information in a database would be better, for various reasons. It would have a better organization, maintenance, the code would not be extensive, they would not have many pages .html taking up space on your server. It takes a little bit of work to register everything, but it’s worth thinking about the usability of the system.
– Diego Souza