Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/04/2022 in all areas

  1. First and foremost, I hope this code isn't on a live server - you're wide open to SQL injection in many, many places. That having been said, there's also some suspect logic - for instance, line 186. Even if it were working I'm not sure you'd be getting the results you expect. Right before that, you set $stok_awal to the value of $data['qty'] or 0 if $data['qty'] is null. You then subtract $data['qty'] from $stok_awal (which again, is the value of $data['qty'] or 0) without checking to make sure that $data['qty'] exists. The basic problem here is that $data['qty'] doesn't exist. Or more to the point, $data is null. You need to output $data and see what exactly - if anything - it contains. After that, look into prepared statements and update all your queries.
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.