vc65 Posted February 9, 2013 Share Posted February 9, 2013 Hi, I am fairly new to using this website. I have to create a Budget tool in PHP. I am unsure of how to go about starting this though. The tool is supposed to subtract different items from a total amount. For example, subtracting rent, food, bills etc from a total amount input. This should then go about telling a user how much money they are left off at the end of their session. Any help would be much appreciated! Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/ Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 You've posted this in the wrong section, this forum is for questions and comments about the PHP Freaks website. I'm moving this to application design, since you have no code and it sounds like you haven't even started. Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411276 Share on other sites More sharing options...
vc65 Posted February 9, 2013 Author Share Posted February 9, 2013 Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411277 Share on other sites More sharing options...
vc65 Posted February 9, 2013 Author Share Posted February 9, 2013 Correct, i have no started this. i am just wanting to know how to come about completing this with any advice. Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411278 Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 (edited) You'll probably want to set up a MySQL database to store your users and their budgets. Will this be for one user only or many users with separate budgets? And will it be something they use one-time and enter everything at once, or will they come back and enter their expenses as they spend them? Are you including income as well? Edited February 9, 2013 by Jessica Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411280 Share on other sites More sharing options...
vc65 Posted February 9, 2013 Author Share Posted February 9, 2013 (edited) Many thanks for the reply. I have created a user database for the tool. However, I will need to create a table in the database with the user budgets. This is for one user when they are logged into the session. Essentially, a user will type their monthly income into a section, after this they will enter in how much they spend on rent, food, etc. After this, the tool should show them what they are left with at the end of the month. Edited February 9, 2013 by vc65 Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411282 Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 So where are you stuck? Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411283 Share on other sites More sharing options...
vc65 Posted February 9, 2013 Author Share Posted February 9, 2013 Thank you for the reply. I am stuck with creating the code for the actual tool itself. I have tried researching different options but nothing seems to work. Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411286 Share on other sites More sharing options...
Jessica Posted February 9, 2013 Share Posted February 9, 2013 That's really vague. It's not like you can just plug in a few lines of something, you're going to have to write a lot of code. You can't be stuck on the ENTIRE project.... Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411287 Share on other sites More sharing options...
Christian F. Posted February 10, 2013 Share Posted February 10, 2013 Go back to square 1, and get a pen and a piece of paper. Then start to write down a step-by-step list of what you want the application to do, as detailed as you can, but only using a few words per line (one verb and one noun is perfect). Once you've done that, and you've accurately described everything that your code should do, then you can start to translate said step-by-step list to actual code. I also recommend reading some basic PHP tutorials, if you are uncertain about the PHP syntax. An example of a step-by-step list as described above: On every run: - Echo input field for income. - Echo input field for rent - Echo input field for phone bill On submission: - Retrieve and validate income - Retrieve and validate rent - Retrieve and validate phone bill - if validation fails - Add error message - stop parsing - Subtract expenses from income and save as total. And so forth, until you've covered everything you want it to do. Quote Link to comment https://forums.phpfreaks.com/topic/274248-php-help/#findComment-1411433 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.