lookup fields

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Please help. What would the code look like to do the following?
Say you were working with customer and order  tables.  You are entering a
new order, and key in the customer id in the orders table.  Or even choose
from a dropdown. Now say you have several other fields about that customer
that you want filled in from the customer table,  ie name, address, phone,
etc...  Once that customerid is entered and a tab key is hit, how do you
have the other fields looked up and auto filled in in code?
Please be basic here, I am new to php programming.  But the auto fill in is
wat I am trying to learn.  By the way, I'm not looking for a short list type
of thing, assume the customer table has several thousand records.   Ive
heard of doing thing this with ajax.  Ok how?  I have no idea how the code
would look.  So far I'm only up to a simple flat file database.  I'm trying
to learn more now. Please see this for a more detailed description of what
I'm after. http://www.codecomments.com/archive227-2005-9-623448.html

Re: lookup fields


This sounds like a great project to learn on. However, it's quite a bit
of instruction for a newsgroup format.  I'd start by learning some basic
database interaction and form processing.  There are lots of tutorials
available on www.phpfreaks.com that will get you going in the right

Good luck!


On Sat, 2006-04-01 at 19:09 +0000, Jim Whitaker wrote:
Quoted text here. Click to load it

Re: lookup fields

Jim Whitaker wrote:
Quoted text here. Click to load it

If you want it to fill in blanks when a tab key is hit, you need a client-side  
language such as javascript.

PHP is server-side; the user must submit the forum to the server for PHP to get  
the form info.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline