MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #31  
Old December 14th, 2011, 08:49 PM
Gordon5878 Gordon5878 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2011
Posts: 2 Gordon5878 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 22 sec
Reputation Power: 0
------------------------------------------------------------------URL
URL
URL

Reply With Quote
  #32  
Old February 16th, 2012, 07:43 PM
jackryan130 jackryan130 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2012
Posts: 1 jackryan130 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 m 16 sec
Reputation Power: 0
use this code...it works

<?php
$result = mysql_query("SELECT type FROM category") or die(mysql_error()); while ($row = mysql_fetch_array($result)) {
$type=$row["type"];
$options.= '<option value="'.$row['type'].'">'.$row['type'].'</option>';
};?>





<SELECT NAME=catid>
<OPTION VALUE=0>Choose</OPTION>
<?php echo $options; ?>
</SELECT>

Reply With Quote
  #33  
Old March 16th, 2012, 02:20 PM
RGT RGT is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2012
Posts: 1 RGT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 m
Reputation Power: 0
I have a similar problem, except:

I have 2 tables, one called users which consists of id, name, distance (which in this instance say distance is set at 500)
I then have another table called location, this has id, name, distance in it and lets say for example this data
id=1, location=london, Distance=50

What i need to do is when a user logs in, they select the location from the drop down menu which is populated from the table, this then in turn takes 50 (distance) from the users distance (leaving 450)

Has anyone got a code example I could study to try and work this out?

Reply With Quote
  #34  
Old April 1st, 2012, 06:00 AM
ranura ranura is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 6 ranura User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 3 m 19 sec
Reputation Power: 0
thanks for sharing

Reply With Quote
  #35  
Old April 1st, 2012, 08:24 PM
Anthony152 Anthony152 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 7 Anthony152 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 32 sec
Reputation Power: 0
I'm new to php myself but use something similar on my site when doing a search and use the following code assuming the 3 dropdown boxes are named a, b and c

Reply With Quote
  #36  
Old April 4th, 2012, 08:38 AM
Weaver239 Weaver239 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2012
Posts: 5 Weaver239 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 m 28 sec
Reputation Power: 0
Great work ! I will keep following this thread!!

Reply With Quote
  #37  
Old December 28th, 2012, 03:31 PM
seabee seabee is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 1 seabee User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 m 44 sec
Reputation Power: 0
I have a similar situation.

I have a database table with all 50 states. I am asking users to pick their 3 favorite states in order.
The first pulldown is easy, using this method.
The second pulldown needs to eliminate the selection of the first pulldown. And the third pulldown needs to eliminate the selections of the first and second pulldowns.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > Drop Down Menu - populated from a mysql database


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap