CSE 102 Introduction to Web Design and Programming

Slides:



Advertisements
Similar presentations
Murach's PHP and MySQL, C1© 2010, Mike Murach & Associates, Inc.Slide 1.
Advertisements

CS 142 Lecture Notes: HTMLSlide 1 Introduction There are several good reasons for taking CS142: Web Applications: ● You will learn a variety of interesting.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
Logins  You will need PHP to test this code, all modern web hosting companies will provide this, Lehigh does not.  I've given you an account on des170.com:
PHP: Hypertext Processor Fred Durao
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
Web Development & Design Foundations with XHTML
Web Systems & Technologies
CSE 102 Introduction to Web Design and Programming
Web Page Introduction.
CSE 102 Introduction to Web Design and Programming
Style Sheets.
The Internet 10/11/11 Fonts and Colors
CIS 228 The Internet 9/20/11 XHTML 1.0.
CSE 102 Introduction to Web Design and Programming
CSE 102 Introduction to Web Design and Programming
Styling with Cascading Stylesheets Very Quick Introduction
© 2017 Akhilesh Bajaj, All Rights Reserved
Introduction to PHP FdSc Module 109 Server side scripting and
Web Page Introduction.
INTRODUCTION TO HTML AND CSS
Web Technologies PHP 5 Basic Language.
Client Side programming: HTML, XHTML & CSS
JavaScript for Client-Side Computation and Data Validation
What is XHTML?.
Using the Internet to publish data and applications
3.0 HTML-CSS WORKSHOP PRESENTATION FOR STUDENTS IN 4º DEGREE OF COMPULSORY SECONDARY EDUCATION.
Client Side programming: HTML, XHTML & CSS
XHTML 1 by Carsomyr.
Passing variables between pages
PHP Hypertext Preprocessor
CSE 102 Introduction to Web Design and Programming
Basic Contact Form user sends an
APTECH JANAKPURI INSTITUTE PROVIDING WEB DESIGNING COURSES Address:- J-1,2nd Floor, Opp Metro Pillar No – 559, Janakpuri East, Delhi /42.
Cascading Style Sheets 2
Introduction to HTML5.
XHTML
HTML A brief introduction HTML.
Chapter 13 - Dynamic HTML: Object Model and Collections
XHTML Review Anita Philipp Updated Spring 2016.
Introduction There are several good reasons for taking CS142: Web Applications: You will learn a variety of interesting concepts. It may inspire you to.
Creating Web Page.
Skulbong Taisawapak ID:
HTML5 Level I Session I Chapter 1 - Introduction to Web Development
CS 142 Lecture Notes: Rails Controllers and Views
Instructor: Charles Moen
Stylin’ with CSS.
Note that iframes are available in HTML5.
The University of Tulsa
The Internet 10/6/11 Cascading Style Sheets
CS 142 Lecture Notes: Rails Controllers and Views
INTRODUCTION TO HTML AND CSS
Tutorial 3 Working with Cascading Style Sheets
Part 1: Cascading Style Sheets
Introduction to HTML5.
Creating a simple web page
Made By : Lavish Chauhan & Abhay Verma
XHTML 7-May-19.
Dreamweaver.
Stylin’ with CSS.
XHTML Basics.
Introduction to HTML5.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Stylin’ with CSS.
Hypertext Preprocessor
Introduction to Cascading Style Sheets (CSS)
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Creating Web Documents
Presentation transcript:

CSE 102 Introduction to Web Design and Programming Form Processing with PHP

PHP Hypertext Preprocessor, an open-source, server-side, HTML embedded scripting language used to create dynamic Web pages. PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML. PHP can perform any task that any CGI program can do and it was created in 1994.

hello.html <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Web Page with Forms</title> <link rel="stylesheet" type="text/css" href="./css/form.css" /> </head> <body> <p style="font-weight: bold; font-size: larger"> Complete this form:</p> <form method="post" action="hello.php"> <pre> Full Name: <input id="name" name="name" size="35" /> Email: <input id="email" name="email" size="35" /> <input type="submit" value="Send" /> </pre> </form> </body> </html>

form.css td.fla { background-color: #d2dbff } form label, form option { font-family: Arial, Helvetica, sans-serif } form input, form select { background-color: #eef }

<html xmlns="http://www. w3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Hello</title></head> <body> <?php $name = $_POST['name']; $email = $_POST['email']; print "<h3>Hello $name,</h3>"; print "<p>The email address you sent is</p>"; print "<p>$email</p>"; ?> </body> </html> hello.php

JoinClub.html <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Join club.com</title> <link rel="stylesheet" href=“css/form.css" type="text/css" title="form" /> </head> <body> <h2>Join <tt>club.com</tt></h2> <form method="post" action= "join.php" enctype="application/x-www-form-urlencoded">   <p style="font-weight: bold; font-size: larger">Join club.com</p> <pre> Full Name: <input id="name" name="name" size="35" /> Email: <input id="email" name="email" size="35" /> <input type="submit" value= "Join Now" /> </pre>   </form> </body> </html> JoinClub.html

<html xmlns="http://www. w3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head><title>Thanks for Joining</title></head> <body style="background-color: white"> <?php $email = $_POST['email']; $name = $_POST['name']; $club="ic.sunysb.edu"; $subject = "New Member club.com"; $myEmail = "YOUR_SPARKY_USERNAME\@ic.sunysb.edu"; $message = "Name: $name\n Email: $email\n to join $club *****\n\n "; $headers = "From: Name of sender\@from.com"; if(mail($email,$subject,$message,$headers)) { print "<h3>Thank you $name. </h3>"; print "<p>Welcome to club.com. Your membership will be processed shortly. </p>"; print "<p>We will email you at <code>$email</code> about your new membership at $club. </p>"; } else print "Doh! Your mail could not be sent."; ?> </body> </html> join.php