Your HTML code is specifying a height. (If it's not, just specify $height at the top of your PHP code.) The default height is 80, so figure out how much more you need and/or guess and trim it when you see it, so it looks right.
1) The code includes letters. (Some barcodes are digits only.)
2) You rewrite the code generator to generate that barcode. The current code only generates 3 of 9.
Execute an onerror statement before you attempt to connect to the database. If the connection fails, your error code will trap it and give the user a nice neat message.
Disconnect the cable, set a breakpoint in the error code and run the program. When it breaks, debug.print error,number and you'll know which error number to trap for the "Your UTP cable appears to be disconnected. Please call the IT department." messagebox. Then you can exit the program nicely or do what ever else you want at that point.
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download