Re: Populating fields dynamically

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi shaun,

you can do it in tthis way:

after populating the select, you should include inside the select tag an
OnChange clause:

<select OnChange='some action here...'>

, this way when a user is selected, you detect it. then, you can submit your
form with the value, the action will be the same page, and include a

if ($your_employee_submitted_id) {
...
// make a select in your DB with a 'WHERE id = '$your_employee_submitted_id'
 // and include here a javascript function like:
    }
    document.your_form.your_field.value = '<?php  echo
$field_value_taken_from_previous_query?>';
    {
...
}



"Shaun" <shaun@mania.plus.com> escribió en el mensaje
20030410113614.53081.qmail@pb1.pair.com">news:20030410113614.53081.qmail@pb1.pair.com...
> Hi,
>
> I have a table called offices in my database. Each office has an ID. Is it
> possible to have a drop down menu on a page so that when an office id is
> selected from it, the other text fields on the are populated i.e. office
> name, office address, office telephone number?
>
> Thanks for your help
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux