You have created a browser page hosted on an Apache server. That browser page has a field for the barcode number and a submit button. Is that right ?
-
Does that work in that if you enter a bar code number in the field and press submit, that data gets into the database ?
-
If that works, then you have to issue an HTTP GET request on your Arduino of the format
"GET /barCodeSave.php?barCodeNumber=0123456789 HTTP/1.1"
which would be more or less what your existing web pages does in the background when you click submit.
Look up "ESP8266 Arduino Web Client" to find examples.