CSV Search using phpMyAdmin


I have a CSV file with 3 fields,  PatronID, LastName, and AccountBalance.  I want to create a site similar to this http://fortcherry.schooltoweb.com/lunchbalance/find.php  so that parents can type in their student's lastname and pin number to see their lunch account balance.

I have MySQL and a new database created.  I log into phpMyAdmin and create a new table.  Add the fields and import the CSV file, however I can only see the first field listed.  I have PatronID as INT,  LastName as Text utf8-general, and AccountBalance as Decimal.  

This is where I am and have no idea how to go any further.

Thank you in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

open phpmyadmin

use the table
and import using CSV using LOAD DATA
and use the Fields terminated as in CSV file

for more detail refer to


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
fferrelAuthor Commented:

OK this works!   All I need now is a sample code for putting this on a website.
u want to upload CSV file into table using PHP....
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

fferrelAuthor Commented:
I already did that.  I can search for results in phpMyAdmin and get the correct output.  I don't know how to create the code for this specific search....

Input  PatronID
Input  LastName


Output AccountBalance

for it do


   //execute ur query and display the result.
fferrelAuthor Commented:
I created a .php that is connected to my database.  I created a generic form with the code listed above.  I have no idea what I am doing beyond this point.  Should I output to a label or text?  

I have a programming knowledge but this is my first time working in php.

This is where I'm stuck (see screen shot).  

So far your help has been tremendous.  Thank you.
fferrelAuthor Commented:
Basically how do I enter in the code to use this form and how do I output,  text or label?

Thank you.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.