mazharsolkar.hashnode.devBasic Calculator in PHP<!DOCTYPE html> <html lang="en"> <body> <form action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>" method='post'> <input type="number" name="num01" placeholder="First Number..." required /> <select name="operator"> <option...Jun 8, 2024·3 min read
mazharsolkar.hashnode.devConditional Statement is PHPif statement <?php $age = 20; if ($age >= 18) { echo "You are an adult."; } if-else statement <?php $age = 16; if ($age >= 18) { echo "You are an adult."; } else { echo "You are a minor."; } Ternary Operator <?php $age = 20; $status =...Jun 8, 2024·2 min read
mazharsolkar.hashnode.devOperators in PHPArithmetic Operators + - / % **(exponential) <?php $a = 2**3; // 2^3 = 8 ?> Assignment Operators = += -= /= %= Comparison Operators == === != !== > < >= <= Increment/Decrement Operator $a++ $a-- Logical Operators and OR && or OR || xor !(not) XOR -...Jun 8, 2024·2 min read
mazharsolkar.hashnode.devBasic Form HandlingSetup Create index.php file. Create includes folder inside this create formhandler.php file. index.php <!DOCTYPE html> <html lang="en"> <body> <form action="includes/formhandler.php" method="post"> <label for="firstname">Firstname: </l...Jun 8, 2024·2 min read
mazharsolkar.hashnode.devPHP Script Tag and DatatypesPHP Script Tag PHP code is written inside PHP script tag. <?php ?> <?php echo "Hello World !"; echo "Mazhar Solkar ?> Note: ?> === semicolon after the last statement inside PHP script tag. semicolon will be automatically added after echo "Mazhar S...Jun 8, 2024·1 min read