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?
 
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
 
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
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.