Jump to content

PintilieVasile

New Members
  • Posts

    1
  • Joined

  • Last visited

PintilieVasile's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hy guys. Today i started to learn php and in my first script (a calculator) i have this error message Parse error: syntax error, unexpected T_LOGICAL_AND, expecting ')' in /home/gameforce/public_html/33/calculator.php on line 5 On localhost i don't have this error. The php code from "calculator.php" it's: <?php $num1 = $_POST['num1']; $num2 = $_POST['num2']; $calculator = $num1 + $num2; if (empty($num1 and $num2)) { echo 'Ambele campuri trebuie sa fie completate.<br>'; else { echo 'Rezultatul este ' . $calculator . '.<br>'; if ($calculator >= 10) { echo 'Rezultatul este mai mare decat 10.<br>'; } else { echo 'Rezultatul nu este mai mare decat 10.'; } } } ?> What's the problem? Thanks and sorry for my bad english.
×
×
  • 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.