Re: [PHP] Calculator beginner issue
- Date: Sun, 8 May 2016 12:16:54 -0700
- From: Jeffry Killen <jekillen@xxxxxxxxxxx>
- Subject: Re: [PHP] Calculator beginner issue
On May 8, 2016, at 11:22 AM, Erwin Noever wrote:
I am sorry to disturb you.
I followed a tutorial and i am a newbe to php but want to learn.
My calculator doesn't work, i dont see what is wrong.
Please can someone explain what the issue is or give me a hint.
Thank you in advance.
<form method="post" action="calc.php">
<input type="text" name="nummer1" placeholder="nummer1" />
<select name="reken" id="kies">
<option value ="plus">+</option>
<option value ="min">-</option>
<option value ="delen">÷</option>
<option value ="maal">x</option>
<input type="number" name="nummer2" placeholder="nummer2" />
<input type="submit" value="calculeer" />
Depending on the doctype of your html, you may have some html errors.
For versions of html less than 5, I believe you need a name attribute
your form opening tag. Also the "placeholder" attribute would be
Otherwise what is happening against expectations, or not happening that
If you aren't aware, a debug console will assist you with html problems.
Another issue would arise if the page with the form is different from
page that processes the form input. The page with php that does the
calculation would need its own html to display the result.
I hope this is helpful
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php