Complex calculator

is it possible in php to create a calculator requiring no user input, by just hitting the buttons, using html, css and php only?

it sure is possible, but I’d do it with javascript instead of PHP, since that’s interactive

what are you wanting to make exactly?

basicly i want to make a pure php calculator, i want a textbox to show the numbers you press, there are all 10 numbers 0-9 and = - + / buttons too. i figured since php is a server side language it would not be possible, unless you refreshed the page every time you clicked a button.

You need to use javascript for making user interface in html, then once you get the user input you can do calculations right there in javascript or you can pass the input values to php and let php calculate the result and return result to user.

Yes, you hit the nail on the head there!

HAng on, using buttons is user input… isn’t it? :lol:

i meant typing into text boxes lol

I don’t think there’s much to lol about but I’ve become a grump over the years…

If you’d been a lot clearer about what you were trying to achieve then you would of gained a lot more help faster. Instead you were pretty vague saying you wanted no user input… then you say you do want user input.

Odd.

wazzaday mentioned the buttons in the same sentence, it wasn’t a big wait to find out what he wanted.

It’s not going to be fun to use a pure PHP calculator, with the page reloading after every press.