I want to have default values depending on the code inputted ( x_code = x_value )..... so that if say x-code, y_code, z_code is entered in my form then x_value, y_value, z_value are selected from their table/s and entered into another table/s as a unique combination.... this is then what will be displayed on my webpage....

I suppose its gonna be a whole bunch of if and select statements and several tables to get where I want to go....