Skip to content
Advertisement

PHP: update through array

I have a problem with the following code.

index.php

JavaScript

crud.class.php

JavaScript

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 the values “omschrijving”

So whatever i put in gerecht wil be overwriten bij the value omschrijving .

Is there also maybe a more simple way for this code to work ?

Best regards Jocem

Advertisement

Answer

Try followed:

JavaScript

I think, that issue can be with $value variable binding, this code binds placeholders to array members.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement