Don't ask to ask, just ask | |
PerlMonks |
Auto completing a form from and to a mysql databaseby Dazz45X (Novice) |
on Oct 15, 2020 at 13:15 UTC ( [id://11122859]=perlquestion: print w/replies, xml ) | Need Help?? |
Dazz45X has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks
Well it's been 3 years since I was here last as I don't really like asking if I can fathom the problems out for myself but this time I'm well and truly stumped. Probably because my perl is still p. poor (although I feel I'm a little better than last time I was here) and I've sort of gleaned from my research that I need Javascript, JQuery and Json to accomplish what I am trying to do?. All of which I am completely clueless about So basically my site works on a few perl scripts cobbled together and is a record selling platform very much like eBay but more specific. Users can sell their own records (45's) by completing a series of forms to enter (and post) the data. Seperately I have a mysql database which includes probably every 45 known of the particular genre about 60000 records. The top part of the form encourages the user to enter the Artist's name, the Record Label and the Title of the record. Usually after adding some more details the form is submitted and saved to a flat file. What I want to be able to do is autocomplete the Artist, Label,Title bit with data from the mysql database. So the user types say 3 letters of the Artists name and a dropdown gives a choice of Artist based on their criteria. The Label input will then produce a dropdown list of all of the Labels the Artist has recorded on for selection and lastly the Title dropdown will include a list of all the titles the Artist has recorded. If the record is not in the database, I would like it to be written back to the database So far the form obviously works to collect data for the flat file, the mysql connects and I have managed to extract Artist, Label and Title and assemble into a Json array, my question I suppose is what do I do now to autocomplete the form? Thank you in advance for any help, suggestions or code you may proffer Dazz
Back to
Seekers of Perl Wisdom
|
|