stutego Posted January 4, 2013 Share Posted January 4, 2013 (edited) somebody once told me in this forum that i can't create a good calculator with php, but i've been trying my best to prove the critics wrong, and in my effort to do so i have written a front view of how the calculator will look like but the problem is am new to php dont have an idea of how to extract the value from the clicking of a number and dont know how to go about with coding php this is the front view <table border ="5"> <table border="2"> <th><input type="text" name="num" size="23" ></th> </table> <table border="3"> <tr> <td><button size="0">+</button></td> <td><button width="0"> - </button></td> <td><button>*</button></td> <td><button>/</button></td> </tr> <tr> <td><button>-></button></td> <td><button>1</button></td> <td><button>2</button></td> <td><button>3</button></td> </tr> <tr> <td><button>4</button></td> <td><button>5</button></td> <td><button>6</button></td> <td><button>7</button></td> </tr> <tr> <td><button>8</button></td> <td><button>9</button></td> <td><button>0</button></td> <td><button>=</button></td> </tr> <tr> <td><button>.</button></td> <td><button>%</button></td> <td><button>^</button></td> <td><button>!</button></td> </tr> </table> </table> please help out Edited January 4, 2013 by stutego Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/ Share on other sites More sharing options...
trq Posted January 4, 2013 Share Posted January 4, 2013 Where exactly are you stuck? We're not here to write code for people. Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/#findComment-1403172 Share on other sites More sharing options...
stutego Posted January 4, 2013 Author Share Posted January 4, 2013 i need help on how to write a code or a clue on what i need to know when writting it Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/#findComment-1403174 Share on other sites More sharing options...
trq Posted January 4, 2013 Share Posted January 4, 2013 You need to read some basic "starting php" tutorials if your here asking such questions. This is a good place to start: http://www.tuxradar.com/practicalphp Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/#findComment-1403175 Share on other sites More sharing options...
stutego Posted January 4, 2013 Author Share Posted January 4, 2013 tanx alot Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/#findComment-1403177 Share on other sites More sharing options...
cpd Posted January 4, 2013 Share Posted January 4, 2013 You're better off writing a calculator in Javascript - so I'm agreeing with the critics. Due to the RESTful nature of the web your calculator (client) has to send requests to the calculator processing pages (server) every time you want to make a calculation i.e. the page has to refresh every time you click a button and store what you clicked somewhere for use later. That in itself is a nightmare. You'd find it easier, in my honest opinion, to use Javascript. Quote Link to comment https://forums.phpfreaks.com/topic/272688-please-help-out-on-a-project-am-working-on/#findComment-1403186 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.