A little PHP.

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.
Chapter 31 Basic Form-Processing Techniques JavaServer Pages By Xue Bai.
Website Development Introducing PHP The PHP scripting language Syntax derives from C, Java and Perl Open Source Links to MySql database.
Uploading Files. Why? By giving a user the option to upload a file you are creating an interactive page You can enable users have a greater web experience.
Setting up in Outlook Express. Select “Tools” from the toolbar menu.
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.
. 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.
PHP: Hypertext Processor Fred Durao
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
(c) Manzur Ashraf, Short course, KFUPM PHP & MySQL 1 Basic PHP Class 2.
HTML Forms What is a form.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
Project Four Forms Discuss form processing Describe the difference between client-side and server-side form processing Add a horizontal rule to a Web page.
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.
XP New Perspectives on Browser and Basics Tutorial 1 1 Browser and Basics Tutorial 1.
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.
Topics Sending an Multipart message Storing images Getting confirmation Session tracking using PHP Graphics Input Validators Cookies.
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.
XP Tutorial 8 Adding Interactivity with ActionScript.
The Module Road Map Assignment 1 Road Map We will look at… Internet / World Wide Web Aspects of their operation The role of clients and servers ASPX.
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!
Starting BBEdit or Notepad and Opening the HTML File Start BBEdit or Notepad Select Open from the File Menu Open survey1.htm from the Public Folder.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
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)
1 An Introduction to Dreamweaver and PHP Part B: Some introductory PHP and JavaScript.
Basic ActionScript and PHP Cis 126. Getting Started set up a basic folder structure so we can keep our files organized. Mirror this structure on your.
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
This opens the box as shown above where filtering on the Junk e mail folder can be adjusted. Click on the Blocked Senders tab. If adding an address.
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.
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.
HTML FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
Client-side (JavaScript) Validation. Associating a function with a click event – Part 1 Use the input tag’s onclick attribute to associate a function.
A little PHP. Enter the simple HTML code seen below.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Session 2 Basics of PHP.
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
Web Programming– UFCFB Lecture 17
Intro to PHP & Variables
HTML Forms and User Input
(Includes setup) FAQ ON DOCUMENTS (Includes setup)
Home page for CIS44..
Hyperlinks Links for .
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 and ends 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 $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 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 an Id.

Add option tags between the select tags Add option tags between the select tags. The value of an option is what it will send to the server. The text between the two tags is what will show on the page.

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 email address, give it the name (and id) txtEmail

Add new PHP code to email 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 email will use HTML format

PHP Concatenation $body = "<html><body><p>Username: " . $UserName . "</p>"; $body = $body . "<p>Team Member: " . $TeamName . "</p></body></html>"; 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 or gamma), the HTML page that results from the handler, and the resulting email message (it may go to the Junk folder).