登录
首页 >  数据库 >  MySQL

ISSS615 Data Management

来源:SegmentFault

时间:2023-02-24 15:20:25 340浏览 收藏

数据库小白一枚,正在不断学习积累知识,现将学习到的知识记录一下,也是将我的所得分享给大家!而今天这篇文章《ISSS615 Data Management》带大家来了解一下ISSS615 Data Management,希望对大家的知识积累有所帮助,从而弥补自己的不足,助力实战开发!

ISSS615 Data Management
PHP_LAB1.doc page 1 of 4
SMU Classification: Restricted
PHP Lab 1
Objective:
The objective is to help the students to get hands on writing PHP code. In this lab
exercise, you will create PHP pages based on the requirements specified.
Pre-Requisites:

  1. WAMP Server is installed and the icon is ‘Green’ in colour.
    Submission:
    Please submit all your answers in a single lab1.zip file containing the following to eLearn
    (online) by the end of the class
  2. Exercise1.php,
  3. Exercise2.php,
  4. ex1form.html and ex1result.php
  5. ex3form.html and ex3result.php
    ISSS615 Data Management
    PHP_LAB1.doc page 2 of 4
    SMU Classification: Restricted
    PART 1: Write basic PHP syntax codes
    Exercise 1
    Using php WHILE construct and IF-ELSE statement, write a program to display the count
    of lowercase letter 'a' appearing in the text string "Data Management". Also display total
    number of letters that are not 'a' in the same text string.
    Save the file as Exercise1.php
    Note: You could make use of the functions strlen and substr for this exercise.
    Exercise 2
    Write php program to calculate the cumulative sum of numbers from 1 to 10.
    Display the result in a table format. Save the file as Exercise2.php
    Note: Example of a Table html script that produces a table with 2 rows, a header row and
    a content / data row









    Header 1Header 2
    Column 1Column 2



    ISSS615 Data Management
    PHP_LAB1.doc page 3 of 4
    SMU Classification: Restricted
    PART 2: Write PHP code for processing HTML Form data
    1. Open a text editor, write the following code, and save the file as ex1form.html

      A simple form


      Enter your name:




    2. Open a new page on the text editor, write the following code and save the file as
      ex1result.php


      print "Hi $_POST[fullname]. Welcome to PHP lab1 !
      ";>

    3. In Internet Explorer/, enter http://localhost/PHPLab1/ex1form.html in the address bar.
      You should see an output as follows
    4. When you enter your name and click on the send button, the following output is
      observed.
      ISSS615 Data Management
      PHP_LAB1.doc page 4 of 4
      SMU Classification: Restricted
      Exercise 3
      Add Gender Identification to the PHP code for processing HTML Form data
      Your task is to modify the ex1form.html to include a dropdown box to allow user to select
      a gender. Depending on the selected gender, you should print either “Miss” or “Mr”
      Hint:
    5. Modify ex1form.html to include another input element, a dropdown box named
      gender (Male & Female).

      Save the modified file as Exercise3Form.html.
    6. Modify the PHP page (ex1result.php) so that it handles the gender information sent
      over by the client and save the modified file as Exercise3Result.php.
      If Female is selected, the following output is observed.
      If Male is selected in the select dropdown list, the following output is observed.
      End of PHP Lab 1
      WX:codehelp

终于介绍完啦!小伙伴们,这篇关于《ISSS615 Data Management》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布数据库相关知识,快来关注吧!

声明:本文转载于:SegmentFault 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>
评论列表