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

Edited by Janu123
Link to comment
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.