## Help needed

This is where you share YOUR scripts with others

Moderators: macek, egami, gesf

New php-forum User
Posts: 1
Joined: Wed Feb 22, 2012 10:10 pm

### Help needed

Greetings friends. Can somebody out there help me with simple code and calculate this problem below using php and a form input from a browser.

Any equation of the form ax2 + bx + c = 0 where a ≠ 0 is called a quadratic equation. And a, b and c are real numbers.
We normally use the formula:
to find the roots of the quadratic equation. However, not all quadratic equations will have roots.
The Discriminant, D is used to determine the nature of the roots.
D = b2 – 4ac
If D > 0 then the quadratic equation has two distinct real roots.
If D = 0 then the quadratic equation has one real root, x = -b/2a.
And if D < 0 then the quadratic equation has no real roots. In fact, it has complex roots.
Further if a = 0 and b ≠ 0 and c ≠ 0 then x = - b/c and if a = b = c = 0 then the quadratic equation has an infinite number of roots.