Free Essay

Php Tutorial

In: Computers and Technology

Submitted By gafoolad
Words 546
Pages 3
PHP Tutorial From beginner to master
PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP. In our PHP tutorial you will learn about PHP, and how to execute scripts on your server

Pre-requisites
Before you continue you should have a basic understanding of the following:
• •

HTML/XHTML JavaScript

What is PHP?
• • • • • •

PHP stands for PHP: Hypertext Preprocessor PHP is a server-side scripting language, like ASP PHP scripts are executed on the server PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) PHP is an open source software PHP is free to download and use

What is a PHP File?
• • •

PHP files can contain text, HTML tags and scripts PHP files are returned to the browser as plain HTML PHP files have a file extension of ".php", ".php3", or ".phtml"

What is MySQL?
• • • •

MySQL is a database server MySQL is ideal for both small and large applications MySQL supports standard SQL MySQL compiles on a number of platforms
1



MySQL is free to download and use

PHP + MySQL


PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)

Why PHP?
• • • •

PHP runs on different platforms (Windows, Linux, Unix, etc.) PHP is compatible with almost all servers used today (Apache, IIS, etc.) PHP is FREE to download from the official PHP resource: www.php.net PHP is easy to learn and runs efficiently on the server side

Where to Start?
To get access to a web server with PHP support, you can:
• •

Install Apache (or IIS) on your own server, install PHP, and MySQL Or find a web hosting plan with PHP and MySQL support

PHP Installation
What do you need?
Most people would prefer to install a all-in-one solution: WampServer 2.0i [07/11/09]  for Windows platform Includes : - Apache 2.2.11 - MySQL 5.1.36 - PHP 5.3.0 http://www.wampserver.com/en/ http://lamphowto.com/  for Linux platform

Already have a web server?
If your server supports PHP you don't need to do anything. Just create some .php files in your web directory, and the server will parse them for you. Because it is free, most web hosts offer PHP support. However, if your server does not

2

support PHP, you must install PHP. Here is a link to a good tutorial from PHP.net on how to install PHP5: http://www.php.net/manual/en/install.php Download PHP Download PHP for free here: http://www.php.net/downloads.php Download MySQL Database Download MySQL for free here: http://www.mysql.com/downloads/index.html Download Apache Server

Download Apache for free here: http://httpd.apache.org/download.cgi Download a nice text editor [Not required] http://www.flos-freeware.ch/notepad2.html PHP Syntax
PHP code is executed on the server, and the plain HTML result is sent to the browser.

Basic PHP Syntax
A PHP scripting block always starts with . A PHP scripting block can be placed anywhere in the document. On servers with shorthand support enabled you can start a scripting block with . For maximum compatibility, we recommend that you use the standard form (…...

Similar Documents

Free Essay

Căn Bản Php

... Moân hoïc: PHP Baøi 1 Nhöõng vaán ñeà chính seõ ñöôïc ñeà caäp trong baøi hoïc: Giôùi thieäu PHP Caáu hình IIS, Apache Web Server Caøi ñaët PHP. o Caøi ñaët PHP. o Caáu hình öùng duïng PHP Giôùi thieäu PHP. o PHP Script. o Ghi chuù trong PHP o In noäi dung baèng PHP PHP vieát taét cuûa chöõ Personal Home Page ra ñôøi naêm 1994 do phaùt minh cuûa Rasmus Lerdorf, vaø noù tieáp tuïc ñöôïc phaùt trieån bôûi nhieàu caù nhaân vaø taäp theå khaùc, do ñoù PHP ñöôïc xem nhö moät saûn phaåm cuûa maõ nguoàn môû. PHP laø kòch baûn trình chuû (server script) chaïy treân phía server (server side) nhö caùch server script khaùc (asp, jsp, cold fusion). PHP laø kòch baûn cho pheùp chuùng ta xaây döïng öùng duïng web treân maïng internet hay intranet töông taùc vôùi moïi cô sôû döõ lieäu nhö mySQL, PostgreSQL, Oracle, SQL Server vaø Access. Löu yù raèng, töø phieân baûn 4.0 trôû veà sau môùi hoã trôï session, ngoaøi ra PHP cuõng nhö Perl laø kòch baûng xöû lyù chuoãi raát maïnh chính vì vaäy baïn coù theå söû duïng PHP trong nhöõng coù yeâu caàu veà xöû lyù chuoãi. 1. GIÔÙI THIEÄU PHP 2. CAØI ÑAËT PHP Caøi ñaët PHP treân neàn Windows thì söû duïng php-4.0.6-Win32.zip, sau khi caøi ñaët öùng duïng naøy treân ñóa cöùng seõ xuaát hieän thö muïc PHP, trong thöï muïc naøy seõ coù taäp tin php4ts.dll vaø php.exe cuøng vôùi thö muïc sessiondata. Ngoaøi ra, trong thö muïc WINDOW hoaëc WINNT seõ xuaát hieän taäp tin php.ini, taäp tin naøy cho pheùp baïn caáu hình cho öùng duïng PHP. Chaúng......

Words: 7561 - Pages: 31

Free Essay

The Tutorials

...A reminder that tutorials start next Monday - 22 July Please check the list below for your Group. All tutorials will be held in the Engineering Demonstration Theatre Group 1 Group 2 Group 3 Group 4 Group 5 Group 6 Monday Monday Monday Wednesday Wednesday Wednesday 13.30 to 14.20 15.30 to 16.20 16.30 to 17.20 9.30 to 10.20 10.30 to 11.20 11.30 to 12.20 ID 1104002 1108305 1109502 1077831 1102302 1096127 1110048 1111423 1101900 1102570 1109000 1092083 1112768 1106513 1108847 1109555 1109208 1110604 1109145 1109543 1108719 1090471 1085067 1104689 1084561 1109934 1086473 1091955 1108668 1108096 1108204 Tutorial Group 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1107714 1094474 1108322 1103558 1107829 1110185 1108336 1108514 1108472 1036708 1096899 1108999 1108633 1090988 1087104 1099054 1107550 1109424 1109192 1109119 1109019 1110883 1109025 1102940 1107637 1107898 1108102 1108526 1108642 1110989 1107840 1107706 1108412 1108717 1109528 1110552 1099108 1107625 1102621 1108494 1110324 1109260 1109368 1105809 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 1108458 1099247 1090357 1105240 1110811 1108774 1109275 1107503 1109162 1110671 1108262 1108203 1102494 1099126 1112082 1103428 1100142 1110063 1109885 1105419 1107722 1100860 1106818 1101452 1104269 1107364 1111003 1104847 1097638 1104084 Waiver 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 6 ...

Words: 289 - Pages: 2

Free Essay

Php for Social Solutions

...Ajmera About the Author Hasin Hayder is a Zend Certified Engineer and open-source enthusiast from Bangladesh. Besides his regular job as Technical Director at Trippert Labs (www.trippert.com), he is often found developing localized Bangla applications and blogging at http://hasin.wordpress.com. He lives in Bangladesh with his wife Ayesha, son Afif and plenty of toys around! About the Reviewers Kalpesh Barot has about 4 years of experience in the world of PHP. He has extensively worked on small and large scale social networking websites developed in PHP. He has been involved in varied projects, from planning and developing web sites to creating custom modules on big social networking websites. Kalpesh received a Masters degree in Enterprise software Engineering from the University of Greenwich, UK in 2004. There he learned the theory behind his computer experience and became a much more efficient computer programmer. Kalpesh has worked actively in the IT sector since his freshman year at university. He has been a PHP developer since then and has developed his skills in this field. Through his increasing responsibilities, he has learned to prioritize needs and wants, and applies this ability to his projects. I would like to thank my wife Bansari for her consistent support. Murshed Ahmmad Khan is a young web developer who believes that nothing is impossible in the arena of programming. With his extensive 5 years work experience in web & system level programming......

Words: 10232 - Pages: 41

Premium Essay

Sql Tutorial

...SQL Tutorial SQL TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL SQL Tutorial SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for Structured Query Language. This tutorial will give you quick start with SQL. Audience This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to SQL languages. Prerequisites Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is database, especially RDBMS and what is a computer programming language. Copyright & Disclaimer Notice All the content and graphics on this tutorial are the property of tutorialspoint.com. Any content from tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com site or this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.com TUTORIALS POINT Simply Easy Learning Table of Content SQL Tutorial .................................................................

Words: 39505 - Pages: 159

Free Essay

Tutorial

...UNIVERSITI TUNKU ABDUL RAHMAN Centre Course Year/ Trimester Lecturer : : : : Centre for Foundation Studies Foundation In Science Year 1 Trimester 1 Unit Code Unit Title Session : : : FHSC1114 Physical Chemistry 2014/05 Ms Azlina Banu, Mr Tam Yun Hong, Ms Chong Pui Kuan, Ms Amelia Chiang Kar Mun, Ms Farhanah, Ms Wong Jing Tyng, Ms Jamie Anne, Ms Lau Mei Chien, Mr Ng Sweet Kin, Ms Phang Ying Ning, Ms Precilla, Ms Rachel Tham, Ms Rajalakshmi, Mr Tan Jun Bin, Ms Tan Lee Siew Tutorial 3 : Chapter 3 Stoichiometry and Solution Concentration 1. Balance the following equations: (a) Al(s) + NH4ClO4(s) → Al2O3(s) + AlCl3(s) + NO(g) + H2O(g) (b) GaBr3(aq) + Na2SO3(aq) → Ga2(SO3)3(aq) + NaBr(aq) 2. Ethanol, C2H5OH, is a liquid with a density of 0.789 g ml-1 at 25 °C. Calculate the molarity of ethanol solution made by dissolving 20.00 mL of ethanol at 25 °C in enough water to make 250.0 ml of solution. [Ans: 1.37 mol L-1] 3. Copper sulfate is widely used as a dietary supplement for animal feed. A lab technician prepares a “stock” solution of CuSO4 by dissolving 79.80 g of CuSO4 in enough water to make 500.0 mL of solution. (a) Determine the molarity of the CuSO4 “stock” solution prepared by the technician. [Ans: 1 mol L-1] (b) Calculate the volume of CuSO4 “stock” solution that should be diluted to give 2.5 L of [Ans: 0.25 L] 0.1 M CuSO4. 4. Aluminum is a limiting reactant in the reaction with sulfur gas to form aluminum sulfide. Initially, 1.18 mol of aluminum and 2.25 mol of...

Words: 447 - Pages: 2

Premium Essay

Tutorial

...Business Information Systems Tutorial Week 6 CASE Study 1: Cloud computing * 1.Are the security arrangements for data and applications stored in the cloud the responsibility of the user or the vendor? * Yes it is the responsibility of user to arrange security arrangement for data and applications stored in the cloud because cloud computing help computers by breaking physical bonds between IT infrastructure and their users.Security threats should be taken so that one can fully benefit from this type of new model.In the cloud one can lose control over assets in some respects,Therefore it is necessary to rethink about security arrangement. 2 . Do you agree with Microsoft’s bold prediction that the cloud is the foundation of the 21st-century digital economy? Yes I agree with Microsoft bold prediction that cloud is the foundation of 21st century because it has various advantages over traditional storage on hard drives.People who uses cloud computing can easily access data application from any part of the world.By this hardware cost of the organization can be reduce which results in less requirement of space by the hardware. 3.As an individual user you need to consider whether you would utilise the cloud for data, photo and music storage, among other things. Discuss the reasons for your decision. If cloud for data,photo and music storage works through web app then your browser address bar looks for “https” instead of http,this extra s tells......

Words: 686 - Pages: 3

Free Essay

Web-Based Programmed-Instruction in Php Programming

...computer technology, committed to the vision of the college, hereby presented a study on “Development of Web-based Programmed-Instruction Software in PHP: Hypertext Preprocessor Programming”. The nature of instructional delivery on the web has certainly become more open than the closed programmed instruction software available in the past. However, programmed-instruction has proven itself useful for some forms of learning via the web. It is worth considering how programmed-instruction was implemented for computer instruction in the past and how that might be combined with other theories to enhance instruction delivered by the Web. PHP is an open source server-side and HTML-embedded scripting language for Web servers, which provide dynamic Web pages just like ASP, ColdFusion, Mod_Perl or JSP. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly. PHP stands for PHP: Hypertext Preprocessor. This confuses many people because the first word of the acronym is the acronym. This type of acronym is called a recursive acronym. HP/FI 2.0 is an early and no longer supported version of PHP. PHP 3 is the successor to PHP/FI 2.0 and is a lot nicer. PHP 5 is the current generation of PHP, which uses the Zend engine 2 which, among other things, offers many additional OOP features. C and Perl developers will find it particularly......

Words: 1258 - Pages: 6

Free Essay

Tutorial

...EPPD2023: STATISTIK UNTUK EKONOMI DAN PERNIAGAAN (SET 2) TUTORIAL 2 1. Jadual menunjukkan gaji sehari bagi 85 pekerja di syarikat pembinaan. |Gaji (RM) |Bilangan | |50.00 – 59.99 |10 | |60.00 – 69.99 |14 | |70.00 – 79.90 |20 | |80.00 – 89.99 |16 | |90.00 – 99.99 |13 | |100.00 – 109.99 |12 | |Jumlah |85 | Dari jadual taburan ulangan di atas tentukan yang berikut: a) Min aritmetik, (jw: 80.17) varians dan sisihan piawai gaji pekerja. b) Paras gaji harian di mana 30% dari pekerja memperoleh gaji harian lebih daripadanya. (Jwp:83.42) c) Kepencongan taburan data tersebut. (jwp: kanan sbb mod = 76) 2. Berikut menunjukkan kedudukan pendapatan bulanan 200 orang nelayan di Besut, Terengganu. |Pendapatan |Ulangan | |Bulanan (RM) | | | 1 – 100 |3 | |101 – 200 |28 | |201 – 400 |96 | |401 – 600 |30 | |601 – 1,000 |24 ......

Words: 428 - Pages: 2

Premium Essay

Sql Tutorial Basics

...SQL Tutorial SQL TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL SQL Tutorial SQL is a database computer language designed for the retrieval and management of data in relational database. SQL stands for Structured Query Language. This tutorial will give you quick start with SQL. Audience This reference has been prepared for the beginners to help them understand the basic to advanced concepts related to SQL languages. Prerequisites Before you start doing practice with various types of examples given in this reference, I'm making an assumption that you are already aware about what is database, especially RDBMS and what is a computer programming language. Copyright & Disclaimer Notice All the content and graphics on this tutorial are the property of tutorialspoint.com. Any content from tutorialspoint.com or this tutorial may not be redistributed or reproduced in any way, shape, or form without the written permission of tutorialspoint.com. Failure to do so is a violation of copyright laws. This tutorial may contain inaccuracies or errors and tutorialspoint provides no guarantee regarding the accuracy of the site or its contents including this tutorial. If you discover that the tutorialspoint.com site or this tutorial content contains some errors, please contact us at webmaster@tutorialspoint.com TUTORIALS POINT Simply Easy Learning Table of Content SQL Tutorial ......................................

Words: 38789 - Pages: 156

Premium Essay

Tutorial

...ECONOMICS, FINANCE AND MARKETING FINANCIAL ECONOMETRICS TUTORIAL EXERCISES We will not use Turnitin in this course; rather tutorials are to be submitted in the assignment box on level 7 in building 80 or sent via the post. Tutorials sent in the mail must be post marked on or before the submission date. Only hard copies will be accepted, also it is best to use a cover sheet. That is, tutorials cannot be submitted by email or via the Learning Hub. ____________________________________________________________________ T1 - 10 marks: DUE DATE: Friday 20th March 2015 SIMPLE LINEAR REGRESSION T1 covers the material in Modules 1 and 2. You are not expected to use material from later modules to answer these questions, but you may need to refer to material covered in Quantitative Methods in Finance and other finance courses. QUESTION 1 – A Cross-sectional study In this question you will be investigating the relationship between exports and imports using a cross-country study. The data needed is on the sheet called countries in the file Tutorial data s1 2015.xls. Economic data on the world’s countries and territories, including exports and imports is sourced from the CIA World Factbook and can be found at: http://www.cia.gov/library/publications/the-world-factbook/ (a) Check and clean the data on exports and imports so it can loaded into Eviews (you will need to do this for all data used in this Tutorial). Checking and setting the data in horizontal line,......

Words: 1720 - Pages: 7

Premium Essay

Database Tutorials

...Database Management Systems Tutorial Week 7 Weight 1% The tutorial assessment each week is generally based on your understanding of the week’s course content, your written answers to each week’s tutorial questions, your group interaction in discussing your answers, and your presentation to the class. You are required to provide written answers to each week’s tutorial questions. The due date for providing answers to each week’s tutorial tasks is by the beginning of your following week’s tutorial session. Make sure to submit your answers to the tutorial questions by its due date electronically using Moodle; and to take with you a printed/hand-written copy of your answers to the next tutorial session. For some questions your tutor may randomly select students to share their answers with the class. For some other questions, your tutor may invite students to discuss their written answers in groups and may ask you to present your group’s collective responses to the class. Due to some particular circumstances, if you are not able to attend a tutorial session, make sure to: a) let your tutor know asap the reason(s) you missed the class by email; b) submit your answers to the tutorial questions by its due date electronically using Moodle. Before attempting the following tutorial activities, you need to learn this week’s lecture slides. To gain more understanding of the topics covered in this week review Chapters: 7.2, 7.3, 7.5, and 8.1 up to but not including 8...

Words: 625 - Pages: 3

Premium Essay

Php My Sql

...phpMyAdmin www.phpmyadmin.net phpMyAdmin is a free software tool written in PHP intended to handle the administration of MySQL over the World Wide Web. phpMyAdmin supports a wide range of operations with MySQL. The most frequently used operations are supported by the user interface (managing databases, tables, fields, relations, indexes, users, permissions, etc), while you still have the ability to directly execute any SQL statement. Loading phpMyAdmin * Start the XAMPP Control Panel and start Apache and MySQL * Open your browser (Firefox or chrome) and type http://localhost/ * You may have to choose your language * On the left click phpMyAdmin under the Tools section * The direct path is: http://localhost/phpmyadmin Using mySQL Task- Create a database and a table to store employee data 1- Create the Database * Click the Databases tab at the top and type the name of a new database. (webapps) * Do not enter any collation. (Collation refers to the character set used to store data in text fields and is necessary to provide support for all of the many written languages of the world. MySQL 4.1 added the ability to override the default system collation at the database, table, and field level. The default collation in MySQL, latin1_swedish_ci, works fine for English because English contains no special characters such as accents. phpMyAdmin allows you to edit the collations of your database, tables, and fields if you desire to support......

Words: 999 - Pages: 4

Premium Essay

Tutorial

...HRPYC81/103/0/2013 Tutorial Letter 103/0/2013 Research Report HRPYC81 Year module Department of Psychology This tutorial letter contains Projects 4808 to 4813 Bar code CONTENTS READ ME FIRST .......................................................................................................................................... 3 PROJECT 4808 ............................................................................................................................................ 4 PROJECT 4809 ............................................................................................................................................ 5 PROJECT 4810 .......................................................................................................................................... 14 PROJECT 4811 .......................................................................................................................................... 36 PROJECT 4812 .......................................................................................................................................... 42 PROJECT 4813 .......................................................................................................................................... 55 2 HRPYC81/103 READ ME FIRST Tutorial Letter 102 Tutorial Letter contains Assignment 01as well as the following projects: Project 4802 Project 4803 Project 4804 Project 4805 Project 4807 Tutorial Letter 103 Tutorial Letter......

Words: 20483 - Pages: 82

Free Essay

Tutorial Letter

...HRBUS83/101/0/2016 Tutorial Letter 101/0/2016 HRBUS83 - Research Project (Business Management) Department of Business Management IMPORTANT INFORMATION This tutorial letter contains important information about module HRBUS83. YOU MUST READ THROUGH THIS TUTORIAL LETTER AND BECHONB/301/3/2016. Open Rubric CONTENTS Page 1 INTRODUCTION ..........................................................................................................................3 2 PURPOSE OF AND OUTCOMES FOR THE MODULE ................................................................ 3 2.1 Purpose ........................................................................................................................................3 2.2 Learning outcomes .......................................................................................................................4 3 LECTURER(S) AND CONTACT DETAILS................................................................................... 4 3.1 Coordinator and lecturer/supervisor .............................................................................................. 4 3.2 Department ...................................................................................................................................4 3.3 Unisa contact details .....................................................................................................................4 4 MODULE-RELATED RESOURCES ............................................

Words: 5654 - Pages: 23

Free Essay

Php How to Use

...Creating dynamic Web sites with PHP and MySQL How to serve database content on the fly Skill Level: Intermediate Md. Ashraful Anam (russell@bangla.net) Web developer ##### 15 May 2001 This tutorial shows you how to create a dynamic Web site using PHP and MySQL. You learn how dynamic sites work and how they serve the content. After reading this tutorial, you will be ready to serve your own dynamic content from your own site. Section 1. Before you start About this tutorial This tutorial shows you how to use two open source, cross-platform tools for creating a dynamic Web site: PHP and MySQL. Prerequisites This tutorial is targeted to developers who are new to PHP and MySQL, and it has no prerequisites. Section 2. Introduction and installation Creating dynamic Web sites with PHP and MySQL © Copyright IBM Corporation 2001. All rights reserved. Trademarks Page 1 of 20 developerWorks® ibm.com/developerWorks The need for dynamic content The Web is no longer static; it's dynamic. As the information content of the Web grows, so does the need to make Web sites more dynamic. Think of an e-shop that has 1,000 products. The owner has to create 1,000 Web pages (one for each product), and whenever anything changes, the owner has to change all those pages. Ouch! Wouldn't it be easier to have only one page that created and served the content on the fly from the information about the products stored in a database, depending on the client request? Nowadays sites......

Words: 2137 - Pages: 9