1. use MySQL headers instead of system ones; 2. move logical part of code into a separate function.
Attach a file by drag & drop or click to upload