Jump to content

extracting data from a database


Janu123

Recommended Posts

Hi

 

First of all i have to say i am a noob to this field so if there any mistakes am sorry.

 What i have done is i have created a database on a server using phpmyadmin. The data base has the columns state, city,career and graduate level which are filled with data.

 

So i need to create a webpage which has a combo box of all the states in the US

A text field for the user to enter the city

Combo box to select the career

Combo box to select the graduate level

 

So after user enters all this data and click search button it should pull the specific data from the database.

 

And also if the user does not enter any value for any input it should show a error

 

I have attached a design of the webpage to get a idea!

 

I have zero knowledge of php coding please help ...

post-166700-0-31514500-1385947681_thumb.jpg

Link to comment
https://forums.phpfreaks.com/topic/284434-extracting-data-from-a-database/
Share on other sites

This question is a bit broad. Yes, this can be done, but there are several smaller pieces you have to put together. What you're asking in this one thread is a bit like me saying "I don't speak a word of French, but I want to write this best-selling French novel. How do I do that?" Obviously, learn French. Learn the vocabulary, learn the syntax. Learn how to write a novel.

 

For you, it'll be a bit simpler than writing a novel, but there are several pieces you need:

 

1. Learn how to do basic PHP - using variables, validating input, printing stuff back to the web browser

 

2. Learn how to create a connection string to a MySQL database

 

3. Learn a few basic MySQL queries

 

4. Learn PDO or mysqli_ (not mysql_) so you can connect your PHP knowledge with your MySQL knowledge

 

5. Finally, logic out the submission of a form and how that queries the database and returns data

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.