Jump to content

Table Lookup


pbalsamo

Recommended Posts

Hi I need help on how to go about a table Lookup. I have a City field with a Combo box and when I click to lookup a City I also want to have the State field and The zip field update. see code below. How do I go about this

thanks

 

<select name="LookupCity" id="LookupCity">

    <option value="" <?php if (!(strcmp("", $row_fmLeads['City']))) {echo "selected=\"selected\"";} ?>>Select from menu</option>

<?php

do { 

?><option value="<?php echo $row_fmCity['City']?>"<?php if (!(strcmp($row_fmCity['City'], $row_fmLeads['City']))) {echo "selected=\"selected\"";} ?>><?php echo $row_fmCity['City']?></option>

    <?php

} while ($row_fmCity = mysql_fetch_assoc($fmCity));

  $rows = mysql_num_rows($fmCity);

  if($rows > 0) {

      mysql_data_seek($fmCity, 0);

  $row_fmCity = mysql_fetch_assoc($fmCity);

  }

?>

</select>

 

Link to comment
https://forums.phpfreaks.com/topic/127409-table-lookup/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.