Jump to content

Arithmetic with drop down menus


Shake n Bake

Recommended Posts

Hi,  :)

 

I'm new to php.

I'm trying to make a basic budget calculator.

 

On the first page you can select the number of income and expense sources.

On the second page you must specify the amount per income or expense.

I have one drop down menu where you can select the amount of income and one with the amount of expenses.

Each source has its own drop down.

 

I now have to get the amounts specified in the drop down menus and calculate the annual income and expenses in a following page. I also have to do a graphical representation of the income and expenses.

 

Anyone have some suggestions on how to gow to work?  ???

Link to comment
https://forums.phpfreaks.com/topic/148096-arithmetic-with-drop-down-menus/
Share on other sites

Please note, I am not a php expert, but one basic way to do this is by utilizing the GET variable to pass information from page to page.

 

On the first page you take the info and pass it to the second page kind of like this:

 

http://www.domain.com/your_second_page.php?incomevar=income&var1=expense1&var2=expense2

 

The "&" separates each variable you want to pass. It must start with "?".

Then you can take all that to the next page and so on and finally make a graph. (I saw some code for a graph somewhere, I'll try to find it.)

 

There is an article at:

http://www.zimmertech.com/tutorials/php/59/passing-variables-in-php.php

 

Hope that helped. BTW - you may want to post this in PHP section.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.