With regard to the error messages in your first post, have you been able to take the information provided by various posters here and at least get past those errors?
I’m not surprised that you were instructed to do things the way you were at that point in time, but as you’ve since upgraded the PHP version, it’s only to be expected that things might change.
Well, kind of, and I fully agree with that sentiment. But you also upgraded the PHP version, so if that wasn’t broke, why would you do that? Obviously without knowing what the previous version was, and what you upgraded to, it’s difficult to comment further, but when upgrading PHP versions it might be a good thing to check release notes to see what might break.
Well, the way to do this is pick things off one at a time and fix them. If you’ve got lots of query lines where you haven’t included the connection parameter, you now know what’s wrong and you can go through and fix all of them, and that might be a good step along the way to fixing things. At the moment, using the query syntax you provided in your first post in this thread, none of your queries will work. To be explicit, this line:
$numresults=mysqli_query($query);
needs to be changed to read:
$numresults=mysqli_query($conn, $query);
where $conn
is the variable you used when you connected to the database, which you’ve said is working correctly. Once you’ve done that line and seen that the error message goes away, you can fix the same fault on line 51 in your post, and then all of the rest of them.
As for the other errors and “won’t work” bits, all you can do is go through them step by step until they work for you, and come back for specific advice if you need it.
Once you have it working, you can look at changing your queries to use parameters instead of the way you’re doing it now. Everything that posters above have said is absolutely correct, but I just wonder if they present too many changes that make the job look more daunting than it needs to be, when all you want to do is make the site work again.