User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,520 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,816 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 4083 | Replies: 16
Reply
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

  #11  
Oct 2nd, 2007
Originally Posted by kkeith29 View Post
sorry forgot something in the readme file. i have updated it. please download the zip file again.
my bad


I can't get the records to display after I click on an author. I just wanted them displayed under the drop down menu and I am getting duplicates of the authors names.
Reply With Quote  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

  #12  
Oct 2nd, 2007
Originally Posted by kkeith29 View Post
sorry forgot something in the readme file. i have updated it. please download the zip file again.
my bad


I am also not sure on what you mean by this:

4. INSERT THE SCRIPT IN select.php WHEREVER THE SELECT BOX NEEDS TO BE
DISPLAYED. IF THIS IS NOT WANTED ADD '<?php include 'select.php';?>' THERE INSTEAD.

5. INCLUDE THE javascript.js FILE INTO THE PAGE. OR INCLUDE '<script type="text/javascript" src="javascript.js"></script>' INSTEAD.

I am just confused on where to add these things. and I don't understand what you mean by insert the script in select.php. Do you mean the javascipt?
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: php mysql drop down list

  #13  
Oct 2nd, 2007
inside the select.php there is code wraped in <?php ?> tags. put this in your page where you need the drop down list to be displayed.
as for the javascript, you can just but
<script type="text/javascript" src="javascript.js"></script>
in the head of the document.
Reply With Quote  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

  #14  
Oct 2nd, 2007
Originally Posted by kkeith29 View Post
inside the select.php there is code wraped in <?php ?> tags. put this in your page where you need the drop down list to be displayed.
as for the javascript, you can just but
<script type="text/javascript" src="javascript.js"></script>
in the head of the document.


I have the authors displaying in my drop down list, but I can't get it to display the title underneath the drop down list. I also have duplicate authors in the drop down.
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: php mysql drop down list

  #15  
Oct 2nd, 2007
the reason duplicate authors are being displayed is because you entered them into the database more than once. all authors should have once entry in the author field. all of the books associated with the author go in the books field on the same row seperated by commas.

also you have to add the
<span id="books"></span>

where you want the books to be displayed
Reply With Quote  
Join Date: Mar 2007
Posts: 18
Reputation: thunderbbolt is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
thunderbbolt thunderbbolt is offline Offline
Newbie Poster

Re: php mysql drop down list

  #16  
Oct 3rd, 2007
Originally Posted by kkeith29 View Post
the reason duplicate authors are being displayed is because you entered them into the database more than once. all authors should have once entry in the author field. all of the books associated with the author go in the books field on the same row seperated by commas.

also you have to add the
<span id="books"></span>

where you want the books to be displayed


is the id refering to a variable in the code here? just trying to understant what it means
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 643
Reputation: kkeith29 is on a distinguished road 
Rep Power: 3
Solved Threads: 72
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Practically a Master Poster

Re: php mysql drop down list

  #17  
Oct 3rd, 2007
its used by the ajax(javascript) to know where to put the books the php code returns
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb PHP Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the PHP Forum

All times are GMT -4. The time now is 4:09 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC