Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.