Web_Programming Lab Report

download Web_Programming Lab Report

of 31

Transcript of Web_Programming Lab Report

  • 8/6/2019 Web_Programming Lab Report

    1/31

    Institute of Technology & ManagementBhilwara (Raj.) - 311001

    Name: Roll No:

    Semester: .. Branch: Information Technology

    Name of Lab: ..

    Index

    S.No. Assignment Date Grade Signature

    1. Create web pages to understand the

    various server controls & to learn Data

    Binding?

    / /2011

    2. Create web pages to understand and useto validate user inputs.

    / /2011

    3. Create web pages to learn how to

    navigate between web pages and

    servers.

    / /2011

    4. Create login form and validate it

    username/ password stored in database

    through PHP?

    / /2011

    5. Create student record and perform

    following operations: Add record,

    delete, and edit, search record,

    navigation between records?

    / /2011

    6. A web application display product namesand price in tabular formats. Each rowcontaining product detail should displayKnow More button. When the button isclicked the description for the selected itemshould be displayed?

    / /2011

  • 8/6/2019 Web_Programming Lab Report

    2/31

    Q.1). Create web pages to understand the various server controls?

    Code:-

    server.php:-

    Untitled Document

    Name

    Roll Number

    Class

    First Year

    Second Year

    Third Year

    Fourth Year

    Hobbies

    Playing

    Singing

    Dancing

    Percentage

  • 8/6/2019 Web_Programming Lab Report

    3/31

  • 8/6/2019 Web_Programming Lab Report

    4/31

    Output:-

  • 8/6/2019 Web_Programming Lab Report

    5/31

    Q.2). Create web pages to understand and use to validate user inputs?

    Code:-

    Validate.php:-

    Untitled Document

    function checkform(form)

    {

    if (form.name.value == "")

    {

    alert("Please enter something in name field....");

    form.name.focus();

    return false;

    }

    else

    {

    return true;

    }

    if (form.fname.value == "")

    {

    alert("Please enter something in Fathers name field....");

  • 8/6/2019 Web_Programming Lab Report

    6/31

    form.name.focus();

    return false;

    }

    else

    {

    return true;

    }

    if (form.phn.value == "")

    {

    alert("Please enter something in Phone field....");

    form.name.focus();

    return false;

    }

    else if(ereg("^[0-9]{6}$"))

    {

    $errmsg = 'Please enter your valid phone number';

    }

    else

    {

    return true;

    }

    var regex = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

  • 8/6/2019 Web_Programming Lab Report

    7/31

    if(form.email.value.length

  • 8/6/2019 Web_Programming Lab Report

    8/31

  • 8/6/2019 Web_Programming Lab Report

    9/31

    Output:-

    Validate.php:-

  • 8/6/2019 Web_Programming Lab Report

    10/31

    Q.3). Create web pages to learn how to navigate between web pages and servers?

    Code:-

    navigate.php:-

    Untitled Document

    Name

    Roll Number

    Marks

  • 8/6/2019 Web_Programming Lab Report

    11/31

    Percentage

    Grade

    next.php:-

  • 8/6/2019 Web_Programming Lab Report

    12/31

    $d = $_POST['percent'];

    $e = $_POST['grade'];

    ?>

    Untitiled

    Your name is



    Your Roll Number is



    You got marks



    Your percentage is



    Your grade is

  • 8/6/2019 Web_Programming Lab Report

    13/31

    Output:-

    Navigate.php

    Next.php

  • 8/6/2019 Web_Programming Lab Report

    14/31

    Q.4) Create login form and validate it username/password stored in database through

    PHP?

    Code:-

    Login.php

    Untitled Document

    Login

  • 8/6/2019 Web_Programming Lab Report

    15/31

    Enter email

    password

  • 8/6/2019 Web_Programming Lab Report

    16/31

    Loginnext.php

  • 8/6/2019 Web_Programming Lab Report

    17/31

    Output:-

    Login.php

    Welcome.php

  • 8/6/2019 Web_Programming Lab Report

    18/31

    Q.5). Create student record and perform following operations: Add record, delete, andedit, search record, navigation between records?

    Code:-

    Index.php:-

    Untitled Document

  • 8/6/2019 Web_Programming Lab Report

    19/31

    add.php:-

    Add New Record

    Name

    Roll Number

    Fathers Name

    Mothers Name

  • 8/6/2019 Web_Programming Lab Report

    20/31

    Date of Birth

    addnext.php:-

  • 8/6/2019 Web_Programming Lab Report

    21/31

    $f = "INSERT INTO CLASS VALUES('$a','$b','$c','$d','$e')";

    mysql_query($f);

    header("location:add.php");

    ?>

    delete.php:-

    Delete The Record

    Enter Roll Number

  • 8/6/2019 Web_Programming Lab Report

    22/31

    deletenext.php:-

  • 8/6/2019 Web_Programming Lab Report

    23/31

    modifynext.php:-

  • 8/6/2019 Web_Programming Lab Report

    24/31

    Mothers Name

    Date of Birth

  • 8/6/2019 Web_Programming Lab Report

    25/31

    Output:-

    Index.php

    Add.php

  • 8/6/2019 Web_Programming Lab Report

    26/31

    Delete.php

    Modify.php

  • 8/6/2019 Web_Programming Lab Report

    27/31

    Q.6). A web application display product names and price in tabular formats. Each

    row containing product detail should display Know More button. When the button is

    clicked the description for the selected item should be displayed?

    Code:-

    index.php:-

    Untitled Document

    S.No.

    Product Name

    Product Price

    Product Detail

    1

  • 8/6/2019 Web_Programming Lab Report

    28/31

    Nokia E7 Mobile Phone

    Rs. 28295

    Latest Nokia cell phone with a very light weight and some new

    existing features....

    Know More

    2

    Panasonic Cordless Phone

    Rs.4500

    Panasonic cordless phone with a very high frequency range and

    also phonebook facility....

    Know More

    3

    Nokia 1616

    Rs.1266

    Nokia 1616, cheapest phone in its range, very good for people who

    just want to receive are call people....

    Know More

  • 8/6/2019 Web_Programming Lab Report

    29/31

    4

    Sony Ericsson Express

    Rs.31499

    Sony ericson Express,a latest Sony mobile handset which gives you

    a very good gaming experience and also have 3G facility....

    Know More

    5

    Sony Cybershot DSC

    Rs.4675

    Latest Sony camera which gives you a very high quality image with

    its camera of 10.1 megapixels....

    Know More

    6

    Mosar bear MP3 Player

    Rs.1299

    Mosar Bear MP3 player gives you facility to play both mp3and

    wma digital music files....

    Know More

  • 8/6/2019 Web_Programming Lab Report

    30/31

    7

    Nikon Digital Camera

    Rs.6375

    Nikon Coolpix Camera can store image in five different formats....

    Know More

  • 8/6/2019 Web_Programming Lab Report

    31/31

    Output:-

    Index.php