php mysql drop down list

Reply

Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

php mysql drop down list

 
0
  #1
Oct 1st, 2007
I am trying to read my database from mysql. I have two fields author and books. I need the author field to be in the drop down list and then when I choose an author I need it to display below on the same page all of the books by that author in the database. I don't really know how to use php. I know how to connect the database to php but then I don't know how to get the author from the database to the drop down list and then I am not really sure how to display the books below. I am working on this for a small local bookstore and I really want to incorporate this feature for them.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: php mysql drop down list

 
0
  #2
Oct 1st, 2007
Well i can help you with that. i have done this many times. if you will post the authors and the books they have, i will make a script for you that you can view on my server in a couple of hours.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

 
0
  #3
Oct 1st, 2007
I also have an id field which is a identification number
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

 
0
  #4
Oct 1st, 2007
Originally Posted by kkeith29 View Post
Well i can help you with that. i have done this many times. if you will post the authors and the books they have, i will make a script for you that you can view on my server in a couple of hours.
ID Author Title
1 Patricia Cornwell Preditor
2 Patricia Cornwell Cruel and Unusual
3 John Grisham The Client
4 John Grisham The Firm
5 John Grisham The rainmaker
6 James Patterson Violets are blue
7 Sue Grafton A is for Alibi
8 Janet Evanovich One for the money
9 Janet Evanovich Two for the dough

This is just part of the file
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: php mysql drop down list

 
0
  #5
Oct 1st, 2007
can i use more than one table or does it need to be in one? i will also give you code to create the database tables if you need it.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

 
0
  #6
Oct 1st, 2007
They only have one table.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: php mysql drop down list

 
0
  #7
Oct 2nd, 2007
i have finished the code. try it here: http://68.103.192.2:8080/thunderbbolt/index.php.
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

 
0
  #8
Oct 2nd, 2007
Originally Posted by kkeith29 View Post
i have finished the code. try it here: http://68.103.192.2:8080/thunderbbolt/index.php.
This is perfect and exactly what they are looking for. How did you do this? Thank you so much.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: php mysql drop down list

 
0
  #9
Oct 2nd, 2007
here is the script: http://68.103.192.2:8080/thunderbbolt/download.zip. there is a README.txt file in there i type for you, telling you everything you need to know. if there is any other questions just pm me.
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 1,227
Reputation: kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about kkeith29 has a spectacular aura about 
Solved Threads: 167
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Nearly a Posting Virtuoso

Re: php mysql drop down list

 
0
  #10
Oct 2nd, 2007
sorry forgot something in the readme file. i have updated it. please download the zip file again.
my bad
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for PHP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC