pbalsamo Posted October 7, 2008 Share Posted October 7, 2008 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 More sharing options...
pbalsamo Posted October 8, 2008 Author Share Posted October 8, 2008 Can this be done with php, it seem no one wants to touch this Link to comment https://forums.phpfreaks.com/topic/127409-table-lookup/#findComment-660005 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.