php bascis

9
PHP | SEEKHO AND SIKHAO ABHISHEK MUKHERJEE

Upload: abhishek-mukherjee

Post on 07-Aug-2015

26 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Php Bascis

PHP | SEEKHO AND SIKHAO

ABHISHEK MUKHERJEE

Page 2: Php Bascis

BASIC REQIREMENTS OF A FUNCTIONAL WEBSITE:

• Frontend• Backend• Some sort of link

Frontend

Backend

Link between

the 2

Page 3: Php Bascis

LANGUAGES OF CODING IN WEB DEVELEOPMENT:

Frontend Backend

HTML PHP

CSS MYSQL

JAVASCRIPT

Page 4: Php Bascis

USES OF EACH LANGUAGE:

• HTML(Hyper Text Markup Language) - Frontend Content

• CSS(Cascading style sheets) – Giving colors and designs

• Javascript – Adding animations

• PHP(Hypertext Preprocessor) – U will get to kw soon

• SQL(Sequential Query Language)- Used to play wid databases

Page 5: Php Bascis

STEPS INVOLVED IN LINKING FRONTEND AND BACKEND:

• DB-Database

• Connection here means open the sql connection by specifying the respective server name , username and password

• CRUD-Create Read Update Delete in database

Create DB

Open Connection

Perform CRUD*

Page 6: Php Bascis

THE STARTERS:• Begin the php code always with a “<?php” tag

• End it with ?>

• This code should be present within the body of the HTML code

• Every variable begins with a $ sign

• To print any variable or value echo command

Page 7: Php Bascis

AND HERE WE BEGIN WITH VARIABLES:• Don’t get scared by the name php has made life easy

• Here we don’t need to declare the data type of the variables

• For those are new to languages please refer basics of programming.ppt

• Any variable needs to be declared by start of a $

• Sample code is knocking next door

Page 8: Php Bascis

SAMPLE RECIPE FOR CHECKING OUT TYPES:• <?php

• $var1="2";--String type

• $var2=3;--integer type

• echo $var2.--Used to display the value of var2

• echo gettype($var1)."<br/>";---Used to Display the type of variable

• settype($var2,"string");--Used to change the type of a variable

• $var3=(int)var1;---used to type cast a variable

• ?>

Page 9: Php Bascis

• This Is just the beginning

• Stay tuned for learning cooler things

Till then we wish u goodbye from our team