Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Creating a rate calculator [was: how do i create this?]

Guest
Sep 21, 2009 Sep 21, 2009

I want to create a rate calculator on a website with 2 input fields: calling from and calling to.  Here is what i've got:

CALLING FROM table:

COUNTRY     $/MIN

Africa            0.10

Europe          0.20

Asia              0.30

CALLING TO table:

COUNTRY     $/MIN

Africa           0.20

Europe         0.30

Asia             0.50

USA             0.10

Basically to get the rate $/min the CALLING FROM selected country and the CALLING TO selected country will be added together i.e calling from africa to USA would be $0.20/min (0.10 + 0.10).

- How do i create the database for this? (in access)

- How do i then create the rate calculator in a webpage? (asp/php)???

I would really appreciate anyone who will be able to help me in this.

Thank you very much.

Natalie

[Subject line edited by moderator to indicate nature of question]

TOPICS
Server side applications
785
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2009 Sep 21, 2009

Create a database table with 3 columns

Country

ToRate

FromRate

Populate these values as appropriate.

Create two drop down menus on your page; FromRate and ToRate.  Populate these with the values (Display value and rate) from the table.

Then, you could either:

1) Submit the form to a server side script that adds and displays the values

2) Use Javascript to add and display the values

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 21, 2009 Sep 21, 2009

hi, thank you for your response.  Please tell me what you mean by 'populate'?  Thank you.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 21, 2009 Sep 21, 2009
LATEST

Populate means that your script will input the values into the fields.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines