A little PHP. Enter the simple HTML code seen below.

Slides:



Advertisements
Similar presentations
Dreamweaver Forms Overview. Forms – A Little Review Most user/webpage communication is one way, like this: Most user/webpage communication is one way,
Advertisements

JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Website Development Introducing PHP The PHP scripting language Syntax derives from C, Java and Perl Open Source Links to MySql database.
Personal Independent Networking Project HTML Forms by Chris Smith.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
PHP and SQL Server: Queries IST2101. Project Report 4 SQL Queries Due Sunday, 4/5 at 11:59pm Instructions on how to access team webspace and SQL database.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
. If the PHP server is an server or is aware of which server is the server, then one can write code that s information. –For example,
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
PHP: Hypertext Processor Fred Durao
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Introduction to PHP and Server Side Technology. Slide 2 PHP History Created in 1995 PHP 5.0 is the current version It’s been around since 2004.
(c) Manzur Ashraf, Short course, KFUPM PHP & MySQL 1 Basic PHP Class 2.
HTML Forms What is a form.
INTERNET APPLICATION DEVELOPMENT For More visit:
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
PHP Hypertext PreProcessor. Documentation Available SAMS books O’Reilly Books.
Homework for October 2011 Nikolay Kostov Telerik Corporation
Server-side Scripting Powering the webs favourite services.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
A little PHP. Enter the simple HTML code seen below.
PHP meets MySQL.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Part 1 – PubMed Interface, Display options, Saving, Printing, and ing results. Instructions This part of the course is a PowerPoint demonstration.
Website Development with PHP and MySQL Saving Data.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
1 Chapter 9 – Cookies, Sessions, FTP, and More spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
ITCS373: Internet Technology Lecture 5: More HTML.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
Intro to PHP IST2101. Review: HTML & Tags 2IST210.
PHP Form Introduction Getting User Information Text Input.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
HTML Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
CSD 340 (Blum)1 Starting JavaScript Homage to the Homage to the Square.
Introduction to JavaScript CS101 Introduction to Computing.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Select (drop-down list) Inputs. Insert/Form/List Menu.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
Creating Databases for Web applications Server side vs client side PHP basics Homework: Get your own versions of sending working: both html and Flash!
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Form Processing Week Four. Form Processing Concepts The principal tool used to process Web forms stored on UNIX servers is a CGI (Common Gateway Interface)
PubMed/How to Search, Display, Download & (module 4.1)
1 An Introduction to Dreamweaver and PHP Part B: Some introductory PHP and JavaScript.
PHP Syntax You cannot view the PHP source code by selecting "View source" in the browser - you will only see the output from the PHP file, which is plain.
PHP Form Processing * referenced from
JavaScript Events Java 4 Understanding Events Events add interactivity between the web page and the user You can think of an event as a trigger that.
CSD 340 (Blum)1 Introducing Text Input elements and Ifs.
Unit-6 Handling Sessions and Cookies. Concept of Session Session values are store in server side not in user’s machine. A session is available as long.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
Java Script Programming. Review: Event Handling Text Box Title: Button.
JavaScript Events. Understanding Events Events add interactivity between the web page and the user Events add interactivity between the web page and the.
1 Server Side scripting PHP. 2 What is PHP? PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
HTML FORM Assignment P4 IST Guideline Add forms in your web page so that visitors can add a comment about your web page Forms should include the.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
A little PHP.
Citation format 1 The “Citation” display option is similar to the abstract display but has some extra information such as MeSH terms and substances listed.
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Intro to PHP & Variables
Home page for CIS44..
PHP-II.
Presentation transcript:

A little PHP

Enter the simple HTML code seen below

Enter the simple HTML/PHP code seen below

Notes on PHP PHP code starts with PHP code can be placed with HTML tags, between HTML tags, etc. To have PHP add something to the HTML page, one uses the PHP instruction print PHP variables begin with a dollar sign Lines of PHP code end with a semicolon

Initializing PHP variables from form input <?php $UserName ="{$_POST['txtName']}"; ?> The code above takes the information from the txtName input box on the form that was sent over in the post operation and assigns it to the $UserName variable, which is later used in a print statement to print the user’s name.

Post both pages to the alpha Use FTP to put both pages on the alpha (alpha.lasalle.edu). PHP is an example of server-side scripting, it must be posted on a server (in particular, a PHP server) in order to work.

Simple Form

Result of clicking

Viewing source of “handler” does not show PHP code. The PHP code is executed on the server side, it prints results into the HTML code that contains it. Then that resulting HTML code is sent to the client.

Open the simple form in Visual Studio, add a select control/element. The right click and choose Properties.

Give the select element (drop-down list) a name, and add some items (text and values).

Drop-down list code in Source view

New PHP to handle drop-down list ?>

Updated form

Result of updated form handler Note that it’s the value and not the text that comes over.

Add a text input for the user to enter an address, give it the name (and id) txt

Add new PHP code to message

The mail function The mail function has up to four arguments: –The address the message will be sent to –The subject of the message –The body of the message –Some extra stuff (including the return address and a formatting statement indicating that the will use HTML format

PHP Concatenation $body = " Username: ". $UserName. " "; $body = $body. " Team Member: ". $TeamName. " "; In PHP the concatenation operator used to make longer strings from smaller strings is a period

For credit To get credit for this lab, show me the form (on the alpha), the HTML page that results from the handler, and the resulting message.