Page 9 of 9 FirstFirst ... 6789
Results 97 to 98 of 98

Thread: PHP MySQL Class-7

  1. #97
    sjamil is offline Junior Member
    Last Online
    15th September 2017 @ 05:33 PM
    Join Date
    18 May 2014
    Gender
    Male
    Posts
    5
    Threads
    1
    Credits
    42
    Thanked: 1

    Default

    For Even and Odd values:

    <html>
    <head><title>Even & Odd using Gettype </title></head>
    <body>
    <form action="evenoddget.php" method="POST">
    Plese enter a number</b>
    <input type="text" name="number" /> <br />
    <input type="hidden" value="true" name="post" />
    <input type="submit" value="Submit" />
    <br />
    <br />
    <br />
    <?php
    if ($_POST ['post']){
    $num = $_POST ['number'];
    $a=$num/2;
    if (gettype($a)==double){
    echo "<h3>$num</h3><h2> ODD Number </h2> &nbsp " . "<br />";
    }
    else {
    echo "<h3>$num</h3><h2> EVEN Number </h2> &nbsp " . "<br />";
    }

    }
    ?>
    </form>
    </body>
    </html>

  2. #98
    sjamil is offline Junior Member
    Last Online
    15th September 2017 @ 05:33 PM
    Join Date
    18 May 2014
    Gender
    Male
    Posts
    5
    Threads
    1
    Credits
    42
    Thanked: 1

    Default

    Assalam U Alaikum,
    Tables of 2 to 20 till 100

    <html>
    <head><title>Tables on demand</title></head>
    <body>
    <form action="tablesmania.php" method="POST">
    <h2>Plese enter a number from 2 to 20</h2>
    <input type="text" name="tables" /> <br />
    <input type="hidden" value="true" name="post" />
    <input type="submit" value="Submit" />
    <br />
    <br />
    <br />
    <?php
    if ($_POST ['post']){
    $numb = $_POST ['tables'];
    if ($numb > 1 and $numb < 21){
    for ($a=1; $a<=100; $a++)
    echo ("<h3>". $numb . "x" . $a . "=" . $numb*$a. "</h3>"."<br />" );
    } else {
    echo "<h2>Enter correct no</h2>";
    }
    }
    ?>
    </form>
    </body>
    </html>

Page 9 of 9 FirstFirst ... 6789

Similar Threads

  1. PHP MySQL Class-3
    By shakeel in forum PHP MySQL
    Replies: 169
    Last Post: 9th September 2016, 11:10 AM
  2. PHP MySQL Class-12
    By shakeel in forum PHP MySQL
    Replies: 60
    Last Post: 10th August 2016, 12:48 PM
  3. PHP MySQL Class-18
    By shakeel in forum PHP MySQL
    Replies: 71
    Last Post: 9th April 2016, 05:07 PM
  4. PHP MySQL Class-20
    By shakeel in forum PHP MySQL
    Replies: 83
    Last Post: 28th August 2015, 06:25 PM
  5. MySql first class
    By aajizUsmani in forum Courses
    Replies: 4
    Last Post: 23rd March 2014, 03:13 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •