Forum Moderators: open
How do I do this:
Let's assume your price list contains the following three fields for each record (either in a database or raw file).
from, to, price
Now, in the form, you either list all available cities (drop-downs) or let the users enter the two cities (text fields) which we'll name,
origin, destination
Having the two cities, you can iterate through the price list and check whether both "origin" and "destination" matches the "from" and "to" fields in the price list. If so, you get the corresponding price for that record and display it.
Oh, and since you're running Joomla, you might need to create a module for this.
[us3.php.net...]
Creating something to do this is not a cut and paste type of thing. You'll need to do some reading.