Hi,
I have this PHP/mySQL query that populates a dropdown
[code=php]
<p class=”textbox”><label for=”company”>company</label><select name=”company” id=”company”>
<?php
$r_company = mysql_query(“SELECT id,company_name,company_url FROM companies”);
echo(mysql_error());
while($r_company = mysql_fetch_assoc($r_company))
{
echo(“<option value=”” . $r_company[‘id’] . “”>” . $r_company[‘company_name’] . “</option>”.”n”);
}
?>
</select></p>
<p class=”textbox”><label for=”url”>Url</label><input type=”text” name=”url” id=”url” value=”<?php /* url from select*/ ?>” /></p>
Is there a way, Im asuming with Javascript / AJAX that depending on the selection from the drop down that i can populate the text input “url”??
Thanks