1
I have a payment system, which has a select that displays the months since the system started, follow the code below:
<select name="situacao">
<option>Fevereiro/2018</option>
<option>Janeiro/2018</option>
<option>Dezembro/2017</option>
<option>Novembro/2017</option>
</select>
What I need is that when I start next month, in the case of March, add the March option automatically, and so on in the coming months.
Do you intend to do this with javascript? Because this may give problem if the computer time is wrong...
– JuniorNunes
Dude, I have no idea how you do it, if you can do it in js it can be, the site is hosted in a lodging, her schedule is correct.
– Nicholas Ruschel Krüger
Serves in PHP? You can do Storing months in a bank
– Geraldão de Rívia
If you can help me
– Nicholas Ruschel Krüger
Da to do using
JS
on the client side, but remember that the current time of the individual’s computer influences. It would be interesting to create something on the server side. If you still want, I’ll create an example of how it would work on the client side– Jorge.M
Cara do not create in JS. As mentioned above, js is on the client machine. If the time/date is wrong (which can easily happen) your code will not work properly. Do it in a server side language. Much safer. PHP is an example, but there are many others you can use, such as: Python, C#, JS even with Node, etc. Examples, already posted and should not be a problem. Good luck.
– DiegoSantos