Jump to content

please help out on a project am working on


stutego

Recommended Posts

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

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.

Archived

This topic is now archived and is closed to further replies.

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