Intro to PHP at Winthrop

Slides:



Advertisements
Similar presentations
PHP Form and File Handling
Advertisements

PHP I.
1 What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Multiple Tiers in Action
PHP Scripts HTML Forms Two-tier Software Architecture PHP Tools.
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
PHP: Hypertext Processor Fred Durao
Intro to PHP at Winthrop CSCI 297 Scripting Languages Day One.
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
PHP : Hypertext Preprocessor
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Additional Topics. Tutorial #9 Review – Forms Forms Legend and fieldset Fields Text Password Radio buttons, check box, text area, select lists Buttons.
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
JavaScript Teppo Räisänen LIIKE/OAMK HTML, CSS, JavaScript HTML defines the structure CSS defines the layout JavaScript is used for scripting It.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
IDK0040 Võrgurakendused I harjutus 06: PHP: Introduction Deniss Kumlander.
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.
Mr. Rouda’s CSCI 101 sections. What does a web page consist of? Code HTML, CSS, XHTML, XML, etc. Images Gif, jpg, png, etc. Plugins Swf, flv, etc. JavaScript.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
JavaScript – Quiz #9 Lecture Code:
Web Interfaces, Forms & Databases Databases Snyder p HTML Basics Snyder p JavaScript Snyder Chapter 18.
Website Development with PHP and MySQL Saving Data.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
CSC 2720 Building Web Applications Server-side Scripting with PHP.
Dynamic web content HTTP and HTML: Berners-Lee’s Basics.
הרצאה 4. עיבוד של דף אינטרנט דינמי מתוך Murach’s PHP and MySQL by Joel Murach and Ray Harris.  דף אינטרנט דינמי משתנה עפ " י הרצת קוד על השרת, יכול להשתנות.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
1) PHP – Personal Home Page Scripting Language 2) JavaScript.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Higher Computing Science Coding the Web: HTML, JavaScript, PHP and MySQL.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Dr. Abdullah Almutairi Spring PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used,
IST 210: PHP Basics IST 210: Organization of Data IST2101.
Module 1 Introduction to JavaScript
JavaScripts.
Introduction to Dynamic Web Programming
Using JavaScript to Show an Alert
Chapter 5 Scripting Language
CSC 301 Web Programming Charles Frank.
Active Server Pages Computer Science 40S.
Lecture 11. Web Standards Continued
EXCEPTION HANDLING IN SERVER CLIENT PROGRAMMING
Chapter 5 Scripting Language
4. Javascript Pemrograman Web I Program Studi Teknik Informatika
PHP / MySQL Introduction
PHP Overview PHP: Hypertext Preprocessor Server-Side Scripting
Simple PHP application
Database Driven Websites
Server-Side Processing II
Web Programming Language
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
Server Side Programming Overview And file system basics
Tutorial 10: Programming with javascript
Introduction to Web programming
Brief Look InTo JavaScript
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.
Web Application Development Using PHP
Presentation transcript:

Intro to PHP at Winthrop CSCI 297 Scripting Languages Day One

PHP Server-Side scripting language PHP code is embedded in HTML interpreted, not compiled PHP code is embedded in HTML PHP code is run on the server machine by the web server program when someone requests the file PHP's output is HTML PHP is Open Source

MySQL relational database management system server based allows multiple users fast, efficient, robust

JavaScript client-side programming language embedded in HTML files instructs browser to react to particular events, set attributes of HTML elements, etc. e.g. popup a new window e.g. check a cookie file e.g. only submit a form that contains valid entries

Hello World - your PHP code <html> <body> <P> <center> <?php function longdate ($timestamp) { return date("l F jS Y", $timestamp); } echo "Hello World<P>Today is "; echo longdate(time()); ?> </body> hello.php On Deltona this file must end with .php not .html

Hello World - what the user sees

Winthrop's Configuration Winthrop's PHP server for students is deltona.birdnest.org Your homepage: http://deltona.birdnest.org/~acc.yourid/ The deltona web server looks for all web files in your public_html directory. You can edit your files from any linux box on the Winthrop network. Your homepage is index.html, not default.htm.

Steps to create your first PHP script Go to your root directory cd Create a public_html directory, if necessary mkdir public_html Make your root directory and the html directory readable by the web server process (it is run by "nobody", not you). chmod a+x . chmod a+x public_html Move to the html directory and create your script file cd public_html vi hello.php chmod a+r hello.php

A Better Example simpleform.html <html> <head> <title>Test Program: Send Form to PHP script</title> </head> <Body> <form method='post' action='simpleformproc.php'> Enter your name:<br> <input type='text' name='yourname'> <P> <input type='submit'> </form> </Body> </html>

A Better Example simpleformproc.php <center> Hello   <html> <head> <title>The processor of simpleform.html</title> </head> <body> <center> Hello   <?php // get name from form $name = $_POST['yourname']; // did they really enter something? if (strlen($name) == 0) echo "whoever you are."; else echo $name; ?> </body> </html>

Your First Homework Type in my hello.php script and get it to work. Add comments your name assignment number Follow the instructions for emailing your work. use the correct subject line