Skip to main content

How To Create Php Calculator-Full Guide In Hindi


How To Create Php Calculator -
Hello friends ajj me apko btaunga  ki kis prakar ham php and html ka use karke calculator teyar kar sakte hai very easily.
Yanha me apko two(do) design me alag alag coding karke calculator banana sikhaunga.Dono calculator ka work same hoga.

Used Language-yanha ham 2 language ka use karege html and css aap bootstrap ka use karke ise mobile responsive be bana sakte  hai easily.
Feature of calculator-
·         Addition
·         Minus
·         Multiply
·         Devide


Calculator 1-


<?php

if (isset($_POST['submit1'])) {



$x = $_POST['x'];

$y = $_POST['y'];



echo $x + $y;

           



}

if (isset($_POST['submit2'])) {



$x = $_POST['x'];

$y = $_POST['y'];



echo $x - $y;

           



}

if (isset($_POST['submit3'])) {



$x = $_POST['x'];

$y = $_POST['y'];



echo $x * $y;

           



}

if (isset($_POST['submit4'])) {



$x = $_POST['x'];

$y = $_POST['y'];



echo $x / $y;

           



}

?>






<!DOCTYPE html>

<html>

<body>



<h1> This is my first calculator>

<form  method="post">

1st<input type="number" name="x"><br>

2nd<input type="number" name="y"><br>

  <button type="submit" name="submit1" value="submit">addition</button>

  <button type="submit" name="submit2" value="submit">minus</button>

     <button type="submit" name="submit3" value="submit">multiply</button>

         

<button type="submit" name="submit4" value="submit">devide</button>

         







</form>







</body>

</html>





Demo




Calculator 2-
yanha me apko ek alag design me calculator  bnakar dikhaunga .iska design calculator 1 se bilkul alag ahi but dono ka work same hai calculator karna.






        <?php



            if (isset($_POST['submit'])) {

                $res1 = $_POST['numb1'];

                $res2 = $_POST['numb2'];

                $operator = $_POST['operator'];

                switch ($operator) {

              

                    case 'Add':

                        echo "Sum: ",$res1 + $res2;

                        break;

                    case 'Subtract':

                        echo $res1 - $res2;

                        break;

                    case 'Multiply':

                        echo $res1 * $res2;

                        break;

                    case 'Divide':

                        echo $res1 / $res2;

                        break;

                  

                }

            }





         ?>






<form method="post">

          Enter First Number   <input type="number" name="numb1"><br>



         Enter Second Number   <input type="number" name="numb2"><br>

      Selection Operation  <select name="operator" id="">

           

               <option>Add</option>

               <option>Subtract</option>

               <option>Multiply</option>

               <option>Divide</option>

           

            </select>

            <button type="submit" name="submit" value="submit">Calculate</button>

         </form>







Demo 2
Ap in dono calculator ko alag alag files bnakar .php extension ke sath save kar lijiye or apne website me upload kar sakte hai.

App calculator ke demo niche diye gye link se dekh sakte ho –

 Me ummid karta hu ki apko mere ye post achi lagi hogi .ise apne dosto ke sath share karna mat bhuliyega.agar apko post se related koi  be problem a rhe hai to app mujse comment me puch sakte hai me apki puri sahayata karne ki koshish karunga
Thank You
Team Gajabwap Web In Hindi
Also Read-

Comments

  1. sir I am very thankful for this post nice info sir

    ReplyDelete
  2. sir dono He design bdiya hai calculator ke

    ReplyDelete
  3. sir ji aapki madad chahiye 9131497044 , 9755795120
    call me or give me your no.

    ReplyDelete
  4. Replies
    1. Bro me Apki puri sahayata karunga aap mujhe facebook page Par msg Karo

      Delete
    2. ok sir ji lekin agar aap ek baar call kar lete to badiya ho jata sir mai kuchh sawal hai uske baad aap jab tak khud nahi bolenge mai aap ko call karke pareshan nahi karunga ....

      Delete
  5. sir aapka adsence to approve ho gaya , fir aap ye popads ke ad kyo lagaye hai sir......

    ReplyDelete
    Replies
    1. nhi hua yr approve addsense tbhi ye add lgaye hai yr

      Delete

Post a Comment

Popular posts from this blog

How to Download Vimeo Thumbnail With PHP

Vimeo Thumbnail Downloader Tool – Vimeo Video Ka Thumbnail Download Karein Aaj ke is tutorial mein hum Vimeo Thumbnail Downloader Tool ke baare mein jaanenge. Is tool ki help se hum Vimeo video URL se us video ki thumbnail image obtain kar sakte hain. Agar aap PHP, Web Development, HTML, CSS aur Online Tools banana seekh rahe hain, to ye ek useful PHP project example hai. Vimeo Thumbnail Downloader Kya Hai? Vimeo Thumbnail Downloader ek simple tool hai jisme user Vimeo video ka URL enter karta hai. Tool Vimeo video ID ko identify karta hai aur available thumbnail image ko display karta hai. Example Vimeo URL: https://vimeo.com/389063954 Is URL mein: 389063954 Vimeo video ID hai. Vimeo Thumbnail Downloader Kaise Work Karta Hai? Is PHP script mein mainly do functions use kiye gaye hain: 1. getVimeoId() Ye function Vimeo URL se video ID find karta hai. 2. getVimeoThumb() Ye function Vimeo video ID ke basis par thumbnail information retrieve karta hai aur available thumbnail...

How To Create Contact Form With Validation-Php & Html

How To Create Contact Form - Hello Friends Ajj Me Apko Btaunga   Ki Kis Prakar   Ham Apni Website Ke Liye Contact Form Bnana Sakta Hai.( By Using   Php Contact Form With Validation Script ) Contact Form Hmare Website Ke Liye Bhut He Jrruri Hota Hai.Contact Form Ke Help Se He User Apna Message Website Owner(Admin) Ko Bhej Sakte Hai. Ajj Me Apko Btane Wala Hu Ki Kis Parkar Ham Contact Form Banakar Apne Website Me Add Kar Sakte Hai Or Apni Website Ke Liye Contact Form Bana Sakte Hai Is Contact Form Me   Ham Php Mail Function() Ka Use Karege . Ab Jab Be Koi User Contact Form Me Apni Information ,Message Details Fill Karke Submit Karega To Uski Sare Information Website Admin Ke Email Id Par A Jaiyegi Jo Be Admin Dwara   Niche Diye Gye Code Me Setup Ki Hogi. Used Language- ·          HTML ·          Jquery ·          Php ...

How To Send Sms From Website Using Php-Textlocal SMS

Hello Friends Ajj Me Apko Btaunga Ki Kis Prakar Aap Apni Website Me Free Sms Send Ka Option Integrate Kar Sakte Ho. Bulk sms in India-Best company Iske Liye Apko Sabse Pehle   Https://Www.Textlocal.In/Signup Par Signup Karke Account Create Karna Hai.Ye Ek Achi bulk sms provider company hai ·          Account Create Hone Ke Bad Aap Apna Username And Password Enter Karke Apne Dashboard Me Login Ho Jaiye( textlocal login) ·          Yanha Apko Text Local Company Dwara 10 Meassge Free Testing Ke Liye Diye Jayege ·          Aap Sms Plan Buy Kar Sakte Ho Is Company Dwara Bhut He Kam Prize Me Sms Pakage,plan provide  Kiye Jate Hai Textlocal Price Plans –  index.php <?php if(isset($_POST['code']) &&  isset($_POST['mobile'])){ // Authorisation details. $username = "enter your textlocal account email id here"; $hash = "...