php bascis
TRANSCRIPT
PHP | SEEKHO AND SIKHAO
ABHISHEK MUKHERJEE
BASIC REQIREMENTS OF A FUNCTIONAL WEBSITE:
• Frontend• Backend• Some sort of link
Frontend
Backend
Link between
the 2
LANGUAGES OF CODING IN WEB DEVELEOPMENT:
Frontend Backend
HTML PHP
CSS MYSQL
JAVASCRIPT
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
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*
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
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
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
• ?>
• This Is just the beginning
• Stay tuned for learning cooler things
Till then we wish u goodbye from our team