<head> <meta content="text/html; charset=utf-8" http-equiv="content-type" /> <title>my First PHP Lab</title> </head>



Similar documents
Download: Server-side technologies. WAMP (Windows), MAMP (Mac),

Internet Ohjelmointi 1 Examples 4

Sample Code with Output

Form Handling. Server-side Web Development and Programming. Form Handling. Server Page Model. Form data appended to request string

Mobile Web Applications using HTML5. L. Cotfas 14 Dec. 2011

API. Application Programmers Interface document. For more information, please contact: Version 2.01 Aug 2015

Web Development Guide. Information Systems

JavaServer Pages Fundamentals

A table is a collection of related data entries and it consists of columns and rows.

Create dynamic sites with PHP & MySQL

lectures/6/src/blink.html blink.html David J. Malan Computer Science S-75 Harvard Summer School 10. <!DOCTYPE html> 12. </script> 16.

ShoreTel Enterprise Contact Center 8 Installing and Implementing Chat

Using Cloud Databases in the Cloud Control Panel By J.R. Arredondo

Chapter 2: Interactive Web Applications

LAB 4 HTML TABLES AND FORMS

Web Application Development

Internet Technologies

CREATING WEB FORMS WEB and FORMS FRAMES AND

INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP

Server-side: PHP and MySQL (continued)

Hello friends, This is Aaditya Purani and i will show you how to Bypass PHP LFI(Local File Inclusion)

Web Security. Jonathan Burket Carnegie Mellon University

The PayPal payment gateway and 4D Business Kit 2.2

Other Language Types CMSC 330: Organization of Programming Languages

HTML Fails: What No One Tells You About HTML

CPAY MERCHANT INTEGRATION SPECIFICATION

DEPARTMENT OF INFORMATION TECHNOLOGY

INUVIKA OPEN VIRTUAL DESKTOP ENTERPRISE

SmartPad4i Solution Guide

7 Web Databases. Access to Web Databases: Servlets, Applets. Java Server Pages PHP, PEAR. Languages: Java, PHP, Python,...

Dimdim Web Meeting Server API Documentation (v4.5)

How To Create A Web Database From A Multimedia Resources Database On A Microsoft Web Browser On A Pc Or Mac Or Mac (For Free) On A Mac Or Ipad Or Ipa (For Cheap) On Pc Or Ipam (For Money

Web [Application] Frameworks

An introduction to web programming with Java

LIBRARY MANAGEMENT SYSTEM

Setup and Administration for ISVs

Concepts Design Basics Command-line MySQL Security Loophole

Supercharge your MySQL application performance with Cloud Databases

Java Server Pages combined with servlets in action. Generals. Java Servlets

CREATING AND PROCESSING HTML FORMS

How To Create A Personalized Website In Chalet.Ch

Server-side: PHP and MySQL

SCA database and search engine. Vignir Barði Einarsson. Supervisor: Nik Whitehead. Faculty of Information Technology, University of Akureyri

Hands-On Workshops HW003

International Journal of Advanced Research in Computer Science and Software Engineering

<a href="document URL"... attributes-list>link Text</a>

7- PHP and MySQL queries

Creating SSO Parent Accounts on the Admin Side for the Public Portal

WordPress Security Scan Configuration

Server side scripting and databases

Extending the Data Warehouse: An Introduction to OLE DB

Chapter 1 Introduction to web development and PHP

DirectOne Hosted Payment Page. Integration Guide

1.264 Lecture 19 Web database: Forms and controls

Joomla 1.0 Extension Development Training. Learning to program for Joomla

Web Page Redirect. Application Note

Agenda. 1. ZAPms Konzept. 2. Benutzer-Kontroller. 3. Laout-Aufbau. 4. Template-Aufbau. 6. Konfiguration. 7. Module.

Application note: Connecting the to a Database

Payment Page Integration Guide

Python and MongoDB. Why?

Príprava štúdia matematiky a informatiky na FMFI UK v anglickom jazyku

Designing framework for web development

Fasthosts ASP scripting examples Page 1 of 17

HTML5 and CSS3. new semantic elements advanced form support CSS3 features other HTML5 features

Installation Tutorial Script: The Real Estate Script. 1. Please login to download script. On PHP Classifieds Script web site.

A Brief Introduction to MySQL

Free Medical Billing. Insurance Payment Posting: The following instructions will help guide you through Insurance Payment Posting Procedures.

EXPLORATiON in THE CROSS TERRiTORY the inevitable continuation of my first paper: Cross Site Scripting - Attack and Defense guide

Creating Java EE Applications and Servlets with IntelliJ IDEA

AD Phonebook 2.2. Installation and configuration. Dovestones Software

NO SQL! NO INJECTION?

8 9 +

HTML Redirect Integration Guide

TO SQL DB. Manual. Page 1 of 7. Manual. Tel & Fax: info@altiliagroup.com Web:

SelectSurvey.NET User Manual

The following steps detail how to prepare your database.

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING

Modeling Presentation Layers of Web Applications for Testing

Galaxy Software Addendum

Developer Guide To The. Virtual Merchant

Web Design Course. Home Page. Join in. Home. Objectives. Course Content. Assignments & Discussion. Grades. Help. Contact Me aab43@uakron.

Oracle Eloqua HIPAA Advanced Data Security Add-on Cloud Service

How to obtain tax return transcripts from the IRS website

Big Bad Moodle Guide By Mike Tupker Version 1

Transcription:

Lab1.html <title>my First PHP Lab</title> <form name = "form1" method = "post" action = "lab1.php"> Please enter your Username and Email<br /> Name: <input type = "text" name = "UserName" value = " " size = "20"> <br /> Email: <input type = "text" name = "Email" value = " " size = "20"><br /> <input type = "submit" name = "button1" value = "Continue"> Lab1.php <?php $strusername = $_POST['UserName']; echo $strusername; $stremail =$_POST['Email']; echo $stremail; Lab2.html <title>lab2</title> <form method="post" action="lab2.php" name="form2"> <table style="width: 100%" border="1">

<td>name</td> <td><input type="text" name="name" size="20"></td> <td>email</td> <td><input type="text" name="email" size="20"></td> <td>gender</td> <td>male:<input type="radio" name="r1" value="male" checked="checked"></td> <td>female:<input type="radio" name="r1" value="female"> </td> <td>expert in:</td> <td>database:<input type="checkbox" name="c1" value="database"></td> <td>unix<input type="checkbox" name="c2" value="unix"></td> <td>programming:<input type="checkbox" name="c3" value="programming"></td> <input type="submit" value="submit" name="submit"> Lab2.php

<title>lab2</title> <form method="post" action="lab2.php" name="form2"> <table style="width: 100%" border="1"> <td>name</td> <td><input type="text" name="name" size="20"></td> <td>email</td> <td><input type="text" name="email" size="20"></td> <td>gender</td> <td>male:<input type="radio" name="r1" value="male" checked="checked"></td> <td>female:<input type="radio" name="r1" value="female"> </td> <td>expert in:</td> <td>database:<input type="checkbox" name="c1" value="database"></td> <td>unix<input type="checkbox" name="c2" value="unix"></td> <td>programming:<input type="checkbox" name="c3" value="programming"></td> <input type="submit" value="submit" name="submit">

VERIFY.PHP <title>confirmation</title> <?php $strlastname = $_POST["LastName"] <?php $strfirstname = $_POST["FirstName"] <?php $stremail = $_POST["Email"] <?php $strusername = $_POST["UserName"] <form method="post" action="process.php"> <h3><b><center>please Confirm Your Data Entry</center></b></h3> <p>if this information is NOT correct, please use the back button of your browser to return to the previous page and re-enter the information. Otherwise, continue.</p> <table border="1" width="100%"> <td width="50%">please enter the Last Name:</td> <td width="50%"><?php print($strlastname); </td> <td width="50%">please enter the First Name:</td> <td width="50%"><?php print($strfirstname); </td> <td width="50%">please enter the Email:</td> <td width="50%"><?php print($stremail); </td> <td width="50%">please enter the User Name:</td> <td width="50%"><?php print($strusername); </td> <td width="50%"></td> <td width="50%"><input type="submit" value="continue" name="button1"/></td>

<input type = "hidden" name = "LastName" value = "<?php print($strlastname); "> <input type = "hidden" name = "FirstName" value = "<?php print($strfirstname); "> <input type = "hidden" name = "Email" value = "<?php print($stremail); "> <input type = "hidden" name = "UserName" value = "<?php print($strusername); "> PROCESS.PHP <title>update the Database</title> <?php $strlastname = $_POST["LastName"] <?php $strfirstname = $_POST["FirstName"] <?php $stremail = $_POST["Email"] <?php $strusername = $_POST["UserName"] <?php $server = "csmaster.sxu.edu"; $username = "ab13001"; $password = "613130"; $handle = mysql_connect($server, $username, $password); $db = mysql_select_db("ab13001"); <?php $sql = "INSERT INTO lab2_students (LastName, FirstName, Email, UserName) VALUES ('$_POST[LastName]','$_POST[FirstName]','$_POST[Email]','$_POST[UserName]')"; if (!mysql_query($sql,$handle)) { die('error: '. mysql_error()); } echo "1 record added"; <form method="post" action="addperson.php"> <h3><b><center> Database Update Completed </center></b></h3>

<table border="1" width="100%"> <td width="50%">last Name:</td><td width="50%"><?php print($strlastname); </td> <td width="50%">first Name:</td><td width="50%"><?php print($strfirstname); </td> <td width="50%">email:</td><td width="50%"><?php print($stremail); </td> <td width="50%">user Name:</td><td width="50%"><?php print($strusername); </td> <td width="50%"></td> <td width="50%"><input type="submit" value="add Another Person" name="button1"/></td> <?php mysql_close($handle); LISTALL.PHP <title>database Information</title> <?php $server = "csmaster.sxu.edu"; $username = "ab13001"; $password = "613130"; $handle = mysql_connect($server, $username, $password); $db = mysql_select_db("ab13001"); <?php $strquery = "Select * from lab2_students "

<?php $rs = mysql_query($strquery) or die(mysql_error()); <?php echo "<table border='1'> <th>user Name</th> <th>first Name</th> <th>last Name</th> <th>email</th> "; <?php while($row = mysql_fetch_array($rs)) { echo ""; echo "<td>". $row['username']. "</td>"; echo "<td>". $row['firstname']. "</td>"; echo "<td>". $row['lastname']. "</td>"; echo "<td>". $row['email']. "</td>"; echo ""; } echo ""; <a href="lab3.php">lab3 Page</a> <?php mysql_close($handle); Lab3.php <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>add or View Records</title> <h3><b><center>add or View Records</center></b></h3>

<table border="1" width="100%"> <form method="post" action="addperson.php"> <td width="50%">add Person Page:</td> <td width="50%"><input type="submit" value="add Person" name="button1"/></td> <form method="post" action="listall.php"> <td width="50%">list All Records Page:</td> <td width="50%"><input type="submit" value="list All" name="button2"/></td> AddPerson.php <title>add Person to the Database</title> <form method="post" action="verify.php"> <h3><b><center>add Person to the Database</center></b></h3> <table border="1" width="100%"> <td width="50%">please enter the Last Name:</td> <td width="50%"><input type="text" name="lastname" size="20"/></td> <td width="50%">please enter the First Name:</td> <td width="50%"><input type="text" name="firstname" size="20"/></td>

<td width="50%">please enter the Email:</td> <td width="50%"><input type="text" name="email" size="20"/></td> <td width="50%">please enter the User Name:</td> <td width="50%"><input type="text" name="username" size="20"/></td> <td width="50%"></td> <td width="50%"><input type="submit" value="submit" name="button1"/></td>