Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > PHP How-To
| Search | Today's Posts | Mark Forums Read
PHP How-To Post your "How do I do this with PHP?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the PHP How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 7th, 2008, 01:14 AM
Registered User
 
Join Date: May 2008
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default DropDown Dynamic Value Change Master/Detail

DEar all please help...

i have two tables .
regionlist
   Rid
   Rname

district
   District_Id
   District_Name
   Rid

now i want to create a form where i should have this both in dropdownlist

so when ever i select region its associated district should appear in next droplist

can anyone help

 
Old May 9th, 2008, 06:24 AM
jomet
Guest
 
Posts: n/a
Default

hi moizshabbir,

welcome to p2p!

when user selects region
reload the page using the selection of dropdown,

take the region and make another query like
select * from district where Rid= "selected rid"

for populating dropdown
thinking you fetched data to an array using sql

for($i=0; $i < count($arr); $i++)
echo <option value=". $arr[$i] .">" . $arr[$i] . "</option>";


jomet.
`````````````````````````````````````````````````` ``````````````````````
Once you start a working on something, dont be afraid of failure and dont abandon it.
People who work sincerely are the happiest.




Similar Threads
Thread Thread Starter Forum Replies Last Post
master-detail hhpatek ADO.NET 0 April 3rd, 2008 02:53 PM
Master Detail prasanta2expert Access VBA 1 October 1st, 2007 06:37 AM
master detail windows from using C# kamran Yousaf Bk Classic ASP Professional 0 January 12th, 2007 06:39 AM
Master-Detail with Datalist comicghozt ASP.NET 1.0 and 1.1 Basics 0 June 7th, 2006 03:41 AM
master/detail beeyule Dreamweaver (all versions) 1 January 18th, 2005 02:59 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.