HTML code upload text file grep through shell script

I am looking for HTML code that browse text file and grep with database file then retrieve result

txtfileuploaded contain
112233
115599
113366

shell code

grep -F -f txtfileuploaded /data/database.txt

result
112233 Mar 41$
115599 Nov 44$
113366 Oct 33$

attached clarify picture

Are you saying a cgi service to grep on the server or ???

yes.I want to upload pattern text to grep it

grep -F -f upload.txt database.txt