Hi Daniel:
It is the second case. Thanks for helping me (again). This is what I did for Step 1...
Code:
<?php
include_once('db-connectdb.php');
if(isset($_GET['zip']) && $_GET['zip'] != ""){
$sql = "SELECT citystate FROM zipcode WHERE zip = '".$_GET['zip']."'";
$result = mysql_query($sql,$connection) or die("Couldn't execute $sql query. <br> mysql error: ".mysql_error());
$row = mysql_fetch_row($result);
$citystate = $row['citystate'];
echo $citystate;
}
?>
I added the OnChange to the zip form field. But I do not know how to do step 3... have no clue about Ajax.
I added this to the <head> section as a guess but it doesn't do anything...
Code:
<script language="Javascript" type="text/javascript">
function getzip()
document.GetElementById('mycitystatefield').value = ajaxresult;
</script>
You can see the page here... http://www.costgallery.com/php/client-add.php
Thanks, e
Bookmarks