CSV Search using phpMyAdmin

Hello,

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
LVL 1
fferrelAsked:
Who is Participating?

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

x
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.

amrish80Commented:
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
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Windows/Q_25136009.html

0

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:
Amrish80!

OK this works!   All I need now is a sample code for putting this on a website.
0
amrish80Commented:
u want to upload CSV file into table using PHP....
0
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

[submit]

Output AccountBalance

0
amrish80Commented:
for it do

if($_POST['submit'])
{
   $PID=$_POST['patronID'];
   $Lname=$_POST['LAstName'];

   //execute ur query and display the result.
}
0
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.
php.JPG
0
fferrelAuthor Commented:
Basically how do I enter in the code to use this form and how do I output,  text or label?

Thank you.
0
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
PHP

From novice to tech pro — start learning today.