Shake n Bake Posted March 5, 2009 Share Posted March 5, 2009 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? ??? Quote Link to comment https://forums.phpfreaks.com/topic/148096-arithmetic-with-drop-down-menus/ Share on other sites More sharing options...
racer x Posted March 6, 2009 Share Posted March 6, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/148096-arithmetic-with-drop-down-menus/#findComment-777839 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.