Sponsored Links


Results 1 to 6 of 6

Thread: CS506 assignment no 5 fall 2010 solution 29-01-2011

  1. #1
    Administrator Xpert's Avatar
    Join Date
    May 2010
    Location
    Jhelum
    Posts
    6,239

    Icon14 CS506 assignment no 5 fall 2010 solution 29-01-2011

    Sponsored Links1


    Objective:

    The objective of this assignment is to provide hands on experience of
    § Setting up PHP
    § Understanding basics of PHP
    § Processing HTML form data and sending response back to client using PHP

    Guidelines

    § Code should be properly aligned and well commented.

    Problem Statement:

    You are required to make a simple web application using PHP that will take Name and Age of Voter. And according to his/her age it will display the message either voter is eligible to vote or not.

    You will write a page index.php, this will be simple page that will contain a html form, this page will have simple html so you can either .html extension or .php, i.e. you can just make index.html if you like.

    The user will entre his name and age on this page and click on submit
    [IMG]file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/msohtml1/01/clip_image002.jpg[/IMG]

    If the age of the user is less then 18 years next page will display message as shown in figure 2.

    If the age of the user will be equal to or more then 18 year it will display message as shown in Figure # 3


    Sponsored Links


    Solution will be uploaded soon

  2. #2
    Please provide solution asap!!

  3. #3

  4. #4
    No....wait!!!!!!!

  5. #5

    Icon14

    (page name) index.html

    HTML Code:
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <form action="result.php" method="post">
    Name: <input type="text" name="Name"><br/><br/>
    Age: <input type="text" name="Age"><br/><br/>
    <input type="submit" name="submit" value="submit">
    <input type="reset" name="reset" value="reset">
    
    
    </form>
    </body>
    </html>
    
    
    (page name) result.php
    
    
    <html>
    <head>
    <title></title>
    </head>
    <body>
    <?php
    $name=$_POST['Name'];
    $age=$_POST['Age'];
    
    if($age<=17){
    echo "$name you are not eligible to vote";
    }
    else {
    echo " $name you are eligible to vote";
    
    }
    ?>
    </body>
    </html>

  6. #6
    I guess so!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 0
    Last Post: 02-19-2011, 11:34 PM
  2. Replies: 14
    Last Post: 01-20-2011, 02:50 AM
  3. Replies: 8
    Last Post: 01-09-2011, 03:49 AM
  4. Replies: 1
    Last Post: 11-24-2010, 12:00 AM
  5. Replies: 14
    Last Post: 11-01-2010, 04:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
-: Vuhelp Disclaimer :-
None of the files shown here are hosted or transmitted by this server. The links are provided solely by this site's users. The administrator's or staff of Vuhelp.net cannot be held responsible for what its users post, or any other actions of its users. You may not use this site to distribute or download any material when you do not have the legal rights to do so. It is your own responsibility to adhere to these terms. If you have any doubts about legality of content or you have any suspicions, feel free to contact us.
Online Education | JhelumSoft