There are a couple of ways to accomplish this...
1) Use the Relational Mod that align db_key fields like the ID field, so that information passed between one database to another database will be in sync.
This Mod is located at the following web address:
www.jpdeni.com/dbman/Mods/relational.txt 2) Then you will have to use conditional statements in the
html_record sub-routine in the
html.pl file that will link to the type of information you want, like the following:
Code:
if ($rec2{'instock'} > 0) {
print qq|<$font><a href="$db_script_url?db=stock&uid=$db_uid&purchase_form=1">In Stock</a></font>|;
}
else {
print qq|<$font><b>Out of Stock</font></b>|;
}
Of course to make this example work, you will have to do the following:
1) Add codes before this conditional statement that will open the second database and search for values in the
instock field. And as of right now...there has not been a fluid solution for searching between two databases in the search form itself (other than searching the databases separately with radio buttons). But to pull the correct data into the result form, you would have to add codes to open and read data from the second database before printing the result.
2) Create a another sub-routine that is for the purchase_form (unless this is an external form, then you can simply link to it).
So, to make a long explanation short...it could be done with a lot of tweaking of the codes. My suggestion is to look at the Relational Mod and see if that will work for you.
Regards,
------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums