I inherited a website that allows the user to type a quantity, then scan a bar code, and it types the item number into a field and tabs to the next field. There are ten of these quantity/item number lines that can be filled out. After hitting Submit, the data is emailed to an address.
I have a CSV file with two columns, one for the item number and another for the description. Can I set it up so that the page will notice when the item number field is populated, and display the text for the description?
I'm ok with solutions that keep the CSV as a separate file, or those that require me to copy the CSV data into the HTML file, if that is necessary. Or any other outside-the-box solutions.
Also, the HTML is inside PHP, I'm not sure how much that matters. Like this:
<?php
if(isset($_POST["submit"])) {
...
} else { ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<body>
...
</body>
</html>
<?php } ?>
Thank you very much for any help you can offer!