In this PHP script I’m using, I’d like to modify a Form by populating a Form field, and hiding it, so that the field is always filled-in with information that I want it to be. Here is the current field in the Form:
You effectively have no choice but to rewrite it to use current PHP.
PHP has two ways to interact with mySQL databases - you can either use mySQLi calls or PDO calls. Both of these were introduced in July 2004. The mysql_ extension was flagged for removal from PHP back in 2012 and was actually removed in 2015. It is no longer a part of PHP and so any code that uses it will break as soon as you upgrade to the latest version of PHP (7). The last version of PHP that still supports it (5.6) is only being fully maintained for another month after which it will only get security patches. The version of PHP before that (5.5) will no longer receive even security patches after next month. As you haven’t upgraded the code during the over three years that was provided for doing so it needs to be your highest priority now given the limited time that remains before the old versions of PHP that still support it are receiving security patches.
So that implies that the album_id field must be an integer (which would make sense), yet you set it to “Album0”. I must admit I don’t know how php deals with attempting to cast a text string to a number.
Thanks for all your replies. Much appreciated.
What are the consequences of not updating the script to work with PHP7?
What would it take to upgrade this type of script? A complete rewrite? Or a modification?
So, with PHP7 the script can no longer use the mySQL database?
The bits to do with mysql will have to change, the rest of it can remain.
You can, but it is accessed in a different way, using either mysqli or PDO.
You should look at learning PDO.
When I made the switch from mysql I went for mysqli, thinking it would be more similar and an easier transition.
But when I later tried PDO, I found it was not that hard to learn and I much prefer it to mysql or mysqli.
lol It was the same with me. With my deeply ingrained procedural mindset I feared OOP would be more complex.
Perhaps it is more complex to write good OOP code, using it is much easier.
At first they are likely to stop getting anything but critical security patches.
After that not upgrading will result in increased security risk.
More than likely, at that time shared hosts will remove the dead versions to protect their customers.
until someone finds a significant security hole and manages to trash all the servers still using it.
Yes, it was originally scheduled to end this month but they have extended the support dates for 5.6 as it is the very last of the PHP 5 versions and so they are giving the tail enders a few extra months to finish upgrading their code. I’d remembered the extended patch support but forgot about the extra six months full support.