Skip to content
Advertisement

Tag: sql-update

PHP: update through array

I have a problem with the following code. index.php crud.class.php The code “works” but it doesnt do it the right way. It does update at the requested id in the correct table, but the values are both the same. The data base contains 2 cols (gerecht and omschrijving) and the values that will be updated to the database a both

How to check if PHP field is empty when using SHA1

I’m using SHA1 to encrypt a password. In my original code I checked if the password fields were empty with: if (empty($newpassword) and (empty($newpassword2))) { } Since I now use SHA1 and it automatically generates da39a3ee5e6b4b0d3255bfef95601890afd80709 when field is left blank, how do I re-write my code? Translate da39a3ee5e6b4b0d3255bfef95601890afd80709 back to string? Or something else? Please help. Answer What you

Advertisement