select box retrieval queries

hello i’m trying to do selectbox queries for my farm database and cant figure out the back end php. the farm database has two tables, FARM(FARMNUMBER,LOCATION,ACREAGE, FARMERNAME) and ANIMAL(ANIMALNUMBER,ANIMALTYPE,AGE,FARMNUMBER)

This is my front end html file:

Choose Farm Number:

Farm 1 Farm 2 Farm 3 Farm 4 Farm 5

basiclly I need whatever option the user chooses the back end file will print a table of the animal number, animal type and age from whatever farmnumber the user chooses from the datebase in. As well as another frontend file that has a selectbox for an order by clause and a selectbox that chooses the results to be printed in a table either ascending or desending.

This would be really helping me out and thank you to whoever can help me.

And your effort is where?

This is something very easy to do…

Attempt it and if you get stuck ask questions and post the code that you attempted.

I agree with the others. What do you need help with? Your basic “front-end” code is one simple select
clause. You have a PHP script named “retrieval.php” which is where your “back-end” would be. What have
you got so far in that file?

Since you asked as a guest, you might be just starting out in PHP. If so, you should do some research on
how to handle form field inputs in PHP. There are millions of sites that help with this beginning step in PHP programming.

Here is one site that has a large number of tutorials on how to do various sections of what you want. Once
you get it working, please let us know and we can help you fix up any errors.

This link is for general PHP coding. Select the item on the left you wish to learn about:
http://www.w3schools.com/php/default.asp
This link is for a full tutorial on forms, validation, required fields and other things you should learn about
how to use PHP with HTML forms. (NOTE: Keep selecting “NEXT-CHAPTER” to move thru the tutorial.)
http://www.w3schools.com/php/php_forms.asp

Hope this helps! Come back when we can see some PHP code that is failing for you and we will help fix
you up with it…

Sponsor our Newsletter | Privacy Policy | Terms of Service