Results 1 to 10 of 40

Thread: Day 7 - Talk To Server - Become PHP Expert in 30 days

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2003
    Posts
    3,040

    Default

    Quote Originally Posted by minisoji View Post
    Code:
     <?php
    
    if (isset($_GET['blood_group'])) {
        echo '<h1>Your Blood Group is , ' . $_GET['blood_group'] . '! Welcome to Rotary Blood Bank.</h1>';
    } else {
    
    echo '
    <html>
    <body>
    
    <h1>Welcome to Blood Donation Group.</h1>
    
    <p>Please enter you name  and blood group below and click that button to enter website.</p>
    
    <form method="GET" action="login.php">
        Enter Your Name: <input name="name" type="text">  <br> <br>
        Enter Your Blood Gourp : <input name="blood_group" type="text">
        <button type="submit">Enter Web Site</button>
    </form>
    
    </body>
    </html>';
    
    }
    http://php.flashwebhost.com/mini/login.php

    Why asked name... if you have no use for it ?

    Find

    Code:
        echo '<h1>Your Blood Group is , ' . $_GET['blood_group'] . '! Welcome to Rotary Blood Bank.</h1>';
    Replace with

    Code:
        echo '<h1>Hello ' . $_GET['name'] . '. Your Blood Group is , ' . $_GET['blood_group'] . '! Welcome to Rotary Blood Bank.</h1>';
    Become PHP Expert in 30 days
    FreeMarriage.com - Free Online Matrimonial
    FlashWebHost.com - Professional Web Hosting, Designing.

  2. #2
    Join Date
    Apr 2005
    Posts
    46,704

    Default

    code corrected. http://php.flashwebhost.com/mini/login_1.php

    Code:
     <?php
    
    if (isset($_GET['blood_group'])) {
         echo '<h1> Hello ' . $_GET['name'] . ' . Your Blood Group is , ' .  $_GET['blood_group'] . '! Welcome to Rotary Blood Bank.</h1>' ;
    } else {
    
    echo '
    <html>
    <body>
    
    <h1>Welcome to Blood Donation Group.</h1>
    
    <p>Please enter you name  and blood group below and click that button to enter website.</p>
    
    <form method="GET" action="login_1.php">
        Enter Your Name: <input name="name" type="text">  <br> <br>
        Enter Your Blood Gourp : <input name="blood_group" type="text">
        <button type="submit">Enter Web Site</button>
    </form>
    
    </body>
    </html>';
    
    }

Tags for this Thread

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
  •