griser Posted October 20, 2012 Share Posted October 20, 2012 Hey there! I've been working on a Calculator with button in PHP and im having some trouble connecting the buttons to my php code. For an example: If i press the first button ("1") Then it's suppose to show up the number "1" on the screen. Mabye it's abit hard to explain but i hope you understand what i mean here. So i would be delight if someone could throw an eye on my code and tell me and explain what i have too do too fix this! Here is my code: http://pastebin.com/FF3NBACa (sorry if im posting this at the wrong place, im new to this forum ! ) Mvh Griser Quote Link to comment https://forums.phpfreaks.com/topic/269725-calc-in-php/ Share on other sites More sharing options...
Christian F. Posted October 20, 2012 Share Posted October 20, 2012 (edited) You should read up on the superglobals in the PHP manual, and perhaps the Getting Started tutorial as well. In any case, you'll find the PHP manual a indispensable tool and reference for any level of PHP work. PS: This is not a RegExp problem, but basic PHP coding. Edited October 20, 2012 by Christian F. Quote Link to comment https://forums.phpfreaks.com/topic/269725-calc-in-php/#findComment-1386652 Share on other sites More sharing options...
derwert Posted October 20, 2012 Share Posted October 20, 2012 While this is possible in PHP it is better suited for javascript. See the link below for a very basic example: Basic Javascript Calculator Quote Link to comment https://forums.phpfreaks.com/topic/269725-calc-in-php/#findComment-1386655 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.