>> PHP: HTML Integration

Slides:



Advertisements
Similar presentations
MA foundation Creating webpages using XHTML (part 2) Simon Mahony CCH.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
2.744 Dreamweaver Tutorial Sangmok Han Feb 24, 2010.
Creating and Editing a Web Page Using Inline Styles
XP 1 Developing a Basic Web Site Tutorial 2: Web Site Structures & Links.
Advance CSS (Menu and Layout) Miftahul Huda. CSS Navigation MENU It's truly remarkable what can be achieved through CSS, especially with navigation menus.
Twitter Bootstrap Paul Frederickson. Tonight’s Objectives Learn how to set up a bootstrap based site Become familiar with bootstrap syntax Create a framework.
This presentation can be downloaded at Presented by the Office of Public Affairs Using the Cal State L.A. Web.
Who Wants to be a Millionaire? Web Page Development Dreamweaver Chapter 2.
Creating Tables in a Web Site Using an External Style Sheet HTML5 & CSS 7 th Edition.
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Understanding HTML Style Sheets. What is a style?  A style is a rule that defines the appearance and position of text and graphics. It may define the.
Creating Tables in a Web Site.  Define table elements  Describe the steps used to plan, design, and code a table  Create a borderless table to organize.
PHP Tutorials 02 Olarik Surinta Management Information System Faculty of Informatics.
Eat Your Words! Creating webpage Layout. CONTENT The Layout of a Webpage HEADER FOOTER Each of these sections represents a ‘div’ (or divider). By linking.
CS117 Introduction to Computer Science II Lecture 2 Creating an HTML Document Instructor: Li Ma Office: NBC 126 Phone: (713)
Basic HTML Hyper text markup Language. Re-cap  … - The tag tells the browser that this is an HTML document The html element is the outermost element.
Creating your Webpage with tables. This is a 2 column by 1 row table!
Linking Images to Other Areas within a Blackboard Course Darek Sady.
Website Development with Dreamweaver
ADOBE WEAVER WEB DESIGN. START THE DW 2 WORKSPACE LAYOUT Application Bar Document Toolbar Document Window Workspace Switcher Property Inspector GroupPanel.
PHP INCLUDES FOR MODULARIZATION CIT 230 – WEB FRONT-END DEVELOPMENT.
HTML, Third Edition--Illustrated Brief 1 HTML, Third Edition Illustrated Brief Unit D Adding Graphics and Multimedia.
INTRODUCTION TO HTML5 Semantic Layout in HTML5.  The new semantic layout in HTML5 refers to a new class of elements that is designed to help you understand.
PHP2. PHP Form Handling The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input. Name: Age:
>> HTML: Structure Elements. Elements in HTML are either Inline or Block. Block-level Elements – Begins on a new line – Occupy the whole width – Stacks.
audio video object Options: controls autoplay Need to define height and width Options: controls autoplay.
XP 1 HTML Tutorial 2: Developing a Basic Web Site.
8 th Semester, Batch 2008 Department Of Computer Science SSUET.
Images Worksheet. Web template Download the template folder Unzip and save in your documents Rename the folder to “images work” without quotes.
Lecture Note 8: ASP Including Files and The Global.asa file.
UNIT 2 UNIT 2 Module 3: HTML Lists Overview. List There are two common types of HTML lists Ordered list numbered Unordered list bullet points.
Mark Dixon Page 1 Soft – HTML. Mark Dixon Page 2 Admin Attendance Register: –log in to your profile.
>> PHP: Insert Query & Form Processing. Insert Query Step 1: Define Form Variables Step 2: Make DB Connection Step 3: Error Handling Step 4: Define the.
Web Design Part I. Click Menu Site to create a new site root.
Tutorial 3 Adding and Formatting Text with CSS Styles.
CSCI 6962: Server-side Design and Programming Facelets and User Interface Design.
Week 2: Building a Simple Website IMC 320 Web Publishing Spring 2011.
HTML, Third Edition--Illustrated Brief 1 HTML, Third Edition Illustrated Brief Unit C Formatting Page Elements with HTML.
HTML Concepts and Techniques Fifth Edition Chapter 3 Creating Web Pages with Links, Images, and Formatted Text.
Advanced Web 2012 Lecture 11 Sean Costain 2012.
1 Preparation for site Create a folder in MyDocuments: beavercheese. Create a subfolder, images Classes, career, DW beginner Download.
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.
11 User Controls Beginning ASP.NET in C# and VB Chapter 8.
HTML Basic Structure. Page Title My First Heading My first paragraph.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 2 Key Concepts 1 Copyright © Terry Felke-Morris.
Creating Web Pages with Links, Images, and Embedded Style Sheets
Before We Begin Please download the files from as we will be using them in our walkthroughs.
LibGuides Interface Customization Presented By: Christine Tobias ~ Kelly Sattler ~ Jenny Brandon Michigan State University Libraries.
Creating a Theme From Scratch in Drupal
Intro to WordPress (Using XAMPP)
>> HTML: Tags – Hyperlink, Media, Lists
PHP 3.
Making a JSON file.
>> Introduction to CSS
>> Header & Footer in CSS
>> PHP: Arrays.
* Lecture # 7 Instructor: Rida Noor Department of Computer Science
>> PHP: Form Processing
Links.
>> PHP: Form-Variables & Submission
Title: Tech Training Certificate: Ace of Initiative Program
Building Web Applications
Add Image and Title to Individual Page
Intro to Web Development Links
Common Page Design Elements
Server Side Includes Server Side Includes (SSI) are simply this:
Week 1 : Preparation.
Hyper text markup Language
XAMPP.
Presentation transcript:

>> PHP: HTML Integration

PHP-HTML Integration PHP within HTML HTML within PHP My name is Mohammed Misbhauddin $name = ‘Mohammed Misbhauddin’; <p>My name is <strong> <?php echo $name; ?> </strong></p> <?php echo ‘<p>My name is <strong>’.$name.’</strong></p> ?> Use concatenation

Case Study Project Setup Download the file work-file to be used Buy4mMe.zip Create New Project in NetBeans/Aptana Set destination path of workspace to the htdocs folder in the XAMPP directory Unzip the downloaded file in D:\xampp\htdocs\project-name folder Web-Based Systems - Misbhauddin

Re-use in PHP Each page has a header and a footer which gets repeated Insert the content of one PHP file into another PHP file before the server executes it Function include or require (Note: Both are same except when they give errors) Usage <?php include(‘file.php’) ?>

Reusing the Header & Footer Create a new PHP file called header.php Copy all the code from top to the div tag with id=“content” and paste it into the new file Delete this code from the index.php file and add the include statement TRY NOW <?php include(‘header.php’) ?> HINT: Repeat the above steps for the footer. Create another file, copy all common footer content to it and replace it in the main file with an “include” php function

Create a New “Contact” Page Create a new PHP file called contact.php Content Div Tag with class section & page Heading 1 with text “Contact Me” TRY NOW Use the header and footer HINT:

Using Variables TRY NOW HOW? ISSUE: Can I change the title of a page if the header and footer are common HOW? Create a new variable in each page called title Set this to the title of that page Use this variable in the header page TRY NOW

Using Conditionals: Navigation States ISSUE: How to change the menu bar current state in a common header? Open the contact.php Add another variable called section with a value of “contact” Now go to the header.php page Add the class “on” to the links Modify it using conditionals so that it is “on” when we are on a specific page TRY NOW Add the php code inside the class attribute of the <li> tag HINT:

Web-Based Systems - Misbhauddin Next on PHP Arrays Regular Arrays Associative Arrays Web-Based Systems - Misbhauddin