Php Lab Exam

Powerful Essays
Rachelle Viado Mr. Ervin Lomboy
BSIT3B July 20,2013 index.php <!DOCTYPE>
<html >
<head>
<title>labexam_viado</title>
</head>
<body>
<div id="container" style="width:1000px">
<div id="header" style="background-color:#A9A9A9;">
<h1 style="margin-bottom:0;"><center>LAB Exam</center></h1></div>
<div id="menu" style="background-color:#FFE4C4;height:500px;width:1000px;float:left;">
<form action= "numberPick.php" method="Post">
<table border="0">
<tr>
<td><b>Enter first number:<td> <input type="text" name="FN" /> </b> <br />
</tr><tr>
<td><b>Enter second number:<td> <input type="text" name="SN"/></b> <br />
</tr><tr>
<td><input type= "submit" name="submit" value="PROCEED TO TABLE" />
</tr></table>
</form>
</div>
<div id="footer" style="background-color:#A9A9A9;clear:both;text-align:center;"> By: Rachelle Viado</div>
</div>
</body>
</html>

numberPick.php
<html>
<head><title>Labexam_viado</title></head>
<body>
<?PHP echo "<table border=8 cellpadding=16>"; $first=$_POST['FN']; $second=$_POST['SN']; $i=1; $j=2; for ($i = 1; $i <= $first; $i++ ) { if($i%2!=0){ echo "<tr>"; echo '<form action="results.php" method="Post">'; echo '<td ><input type="submit" name="1" value= "'.$i.'"/></td>'; for ( $j = 2; $j <= $second; $j++ ) { if($j%2!=0){ echo '<form action="results.php" method="Post">'; echo '<td ><input type="submit" name="2" value= "'.$i * $j.'"/></td>'; } } echo "</tr>"; } } echo "</table>";
?>
</form>
</body>
</html>

You May Also Find These Documents Helpful

  • Good Essays

    Introduction to PHP Application Development PHP, Hypertext PreProcessor (recursive abbreviation) and the formerly abbreviation being "Personal Home Page" is a server-side scripting language developed for use in dynamic and interactive web based PHP application development. PHP is one of the most popular programming languages of the Internet. Even people who are not developers or web designers without a doubt know PHP. PHP has come have fun with extensive use among web designers and is probably…

    • 504 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Cake Php

    • 12915 Words
    • 52 Pages

    of PHP5 | 6 | 3 | Basics of cake PHP | 18 | 4 | Implementation of Cake PHP | 44 | 5 | Conclusion | 50 | 6 | Joining letter | 51 | 7 | Weekly Reports | 52 | | | | | | | | | | | | | Company Profile PHP 5 Introduction With the advent of PHP 5, the object model was rewritten to allow for better performance and more features. This was a major change from PHP 4. PHP 5 has a full object model. Some of the prominent features in PHP 5, include are of visibility, abstract and final classes…

    • 12915 Words
    • 52 Pages
    Powerful Essays
  • Powerful Essays

    Php and Mysgl

    • 1540 Words
    • 7 Pages

    Lesson 1: Introduction to PHP 1 Lesson 1: Introduction to PHP and MySQL Objective: 1. This lesson will cover the fundamentals of PHP and MySQL where it is a powerful tool for making dynamic and interactive web pages. _________________________________________________________________________ Lesson Overview: Basic introduction to PHP concepts, what you should know before learning PHP, why learning PHP is useful, and the benefits to learning PHP. 1.1 3-tier Application Environment  User…

    • 1540 Words
    • 7 Pages
    Powerful Essays
  • Powerful Essays

    PHP with MySQL

    • 6242 Words
    • 25 Pages

    Using PHP5 with MySQL So now that you’ve done some really cool stuff with PHP in Chapter 2, such as using includes and functions, it’s time to make your site truly dynamic and show users some real data. You may or may not have had experience with databases, so we’ll take a look at what MySQL is and how PHP can tap into the data. We will also show you what a MySQL database looks like in terms of the different tables and fields and give you some quickie shortcuts to make your life much easier…

    • 6242 Words
    • 25 Pages
    Powerful Essays
  • Better Essays

    Php Location

    • 962 Words
    • 4 Pages

    HP PHP str_split($ , $) Example: $str="The mice jumped over the cat, giggling madly as the moon exploded into green "; $chunksize=8; $chunkedarr=str_split($str,$chunksize); print_r($chunkedarr); // Every array show 8 character. Metaphone() function // same as ternary operator. Example: echo metaphone(“rset”) == metaphone(“reset”) ? “String are Similar” : “String are not Similar”; parse_url() function // separated url scheme, host, port, path, query. Example: $url = "http://www.melonfire…

    • 962 Words
    • 4 Pages
    Better Essays
  • Good Essays

    Php Tut

    • 723 Words
    • 3 Pages

    By foxy17foxy Hello Everyone, Especially “The 7th Sage” and “Coder-San”, All “moderators”, All “V.I.P members” and All “Hack Community n00bs”.  I (foxy17foxy) am writing this Tutorial especially for Hackcommunity & on the request of Jacob (a VIP member). I am writing this for every newbie, its detailed, step by step “very very Easy”. I am saying this again “VERY VERY EASY”. If you just follow mw step by step its nothing, Just an ABCD. Still If you need any help, Just Pm me or any…

    • 723 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    PHP 04 mySQL

    • 2601 Words
    • 27 Pages

    Manipulating MySQL Databases with PHP Objectives      Connect to MySQL from PHP Learn how to handle MySQL errors Execute SQL statements with PHP Use PHP to work with MySQL databases and tables Use PHP to manipulate database records PHP and mySQL 2 PHP Overview    PHP has the ability to access and manipulate any database that is ODBC compliant PHP includes functionality that allows you to work directly with different types of databases, without going through ODBC PHP supports SQLite, database…

    • 2601 Words
    • 27 Pages
    Powerful Essays
  • Powerful Essays

    Php Lecture Notes

    • 18906 Words
    • 76 Pages

    PHP 5 LECTURE NOTES This tutorial is designed for students in Web Development classes at Pentecost University College. It assumes that the student already has familiarity with the eXtensible Hypertext Markup Language (XHTML), basic programming skills, and with the rudiments of database design and Structured Query Language (SQL). Example scripts run under PHP 5, Apache 2 or IIS 6.0, and Microsoft Windows 2003 Server. XHTML output displays properly under current versions of Microsoft Internet Explorer…

    • 18906 Words
    • 76 Pages
    Powerful Essays
  • Satisfactory Essays

    Php Essay Learning

    • 1138 Words
    • 5 Pages

    Data AS, www.learn-php-tutorial.com For daily and weekly PHP-tips check out www.php-daily.com 2 Learn basic PHP in 6 weeks Copyright 2005 Reimar Vetne www.learn-php-tutorial.com post@learn-php-tutorial.com Flavus Data AS Grønvoldvn 705 N-3830 Ulefoss Norway Table of content 1. Getting started 2. Commenting your code 3. Language Reference 3.1 Types 3.2 Variables 3.3 Constants 3.4 Operators 4. for and while Loop 5. Handling Forms 6. Emails 7. Date and Time functions 8. PHP include function…

    • 1138 Words
    • 5 Pages
    Satisfactory Essays
  • Powerful Essays

    Php, Jsp, and Asp.Net

    • 948 Words
    • 4 Pages

    PHP, JSP, and ASP.NET. Name: Course: Tutor: Date: Server side scripting is a web server technology that is usually used to generate web pages in a dynamic and interactive manner and content that interact with the database and other data stores. To achieve this, several scripting languages have been developed, the most common being jsp (Java server pages), ASP.NET and PHP. PHP PHP is a server-side language in which the PHP codes resides in the host computer and serves web pages to the browser…

    • 948 Words
    • 4 Pages
    Powerful Essays