Category : Php Training

BySlide Scope

Create Read Update Delete in PHP with Source Code

Source Code of Create, Read, Update and Delete in Php.

Source code of config.php

$conn = mysqli_connect(“localhost”, “root”, “”, “northwind”) OR die(“CNC”);


include ‘config.php’;
$sqlshow = “SELECT `CustomerID`, `CompanyName`, `ContactName`, `ContactTitle` FROM `customers` “;
$results = mysqli_query($conn, $sqlshow);
echo “<table border=’1′ width=’100%’><tr><th>ID</th> <th>CompanyName</th> <th>ContactName</th> <th>ContactTitle</th></tr>”;
foreach($results as $result){
<td><?php echo $result[‘CustomerID’];?></td>
<td><?php echo $result[‘CompanyName’];?></td>
<td><?php echo $result[‘ContactName’];?></td>
<td><?php echo $result[‘ContactTitle’];?></td>
<a href=”editcustomers.php?cust_id=<?php echo $result[‘CustomerID’];?>”>Edit</a>
echo “</table>”;


include ‘config.php’;
$custid = $_GET[‘cust_id’];
$sqlshow = “SELECT `CustomerID`, `CompanyName`, `ContactName`, `ContactTitle`
FROM `customers`
WHERE CustomerID = ‘$custid’;
$results = mysqli_query($conn, $sqlshow);
foreach($results as $result){

<input type=”hidden” name=”contid” value=”<?php echo $_GET[‘cust_id’];?>”><br/>
<input type=”text” name=”cmpname” value=”<?php echo $result[‘CompanyName’];?>”><br/>
<input type=”text” name=”contname” value=”<?php echo $result[‘ContactName’];?>”><br/>
<input type=”text” name=”contitle” value=”<?php echo $result[‘ContactTitle’];?>”><br/>
<input type=”submit” name=”update” value=”Update”>
echo $_GET[‘cust_id’];

Download Sql from here

BySlide Scope

Variables in PHP – Core PHP Tutorial Chapter 4

Variables are used in PHP and other programming languages to store dynamic values.

Variables can be used in any PHP program to store information.

How to create or declare a variable in PHP?

Variables are declared using $ (dolar) sign followed by _ (underscore) or alphabets.

If we want to declare a variable named First Name we can write it as:


A variable name can contain Alpha Numeric Characters with or without underscores.

A variable can store values of any data type like strings, bool, float, double or integer.

Remember that in PHP the variables are declared in the same line where a value is assigned to them.

Unlike other programming languages there is no need to firstly declare a variable and then assign a value to it.

You can assign values and declare a variable at the same time.

Here is an example:


$firstName = “Manish”;


If we want to print this variable we can simply write


$firstName = “Manish”;

echo $firstName;

//Outputs : Manish


Variables in PHP are case sensitive.

Note : In the example given above we have not used single quotes or double quotes while echoing or printing $firstName. But a string cannot be assigned to a variable without the use of double or single quotes.

Consider the example given below


$lang = “PHP”;

echo   “We are studying $lang”;

//Outputs : We are studying PHP.


In this example we have written $lang inside double quotes. We will not get any error because the assigned value to $lang variable was a string.

You can watch out Step by Step Tutorial About Variables in PHP

You can join out Php Training in Lucknow

BySlide Scope

Tools needed to Run PHP on local server – PHP Tutorial Part 2

We introduced PHP to students in the Part 1 of this tutorial. In order to run PHP locally or in your computer or laptop you will need following resources:

  1. Apache Web Server

Note – Nginx (high-performance HTTP server), lightspeed (open-source web server) etc. are some alternatives to Apache.

  1. PHP

You can download php from

  1. MySql Server

Needed to Create and Test Databases.

These three resources must be present in your computer in order to run and test PHP code.

PHP can run on any operating system from Microsoft, Linux and Mac-OS if you have necessary resources installed.

If you don’t want to install php manually you can use a simple tool that will install APACHE, PHP, PERL and MYSQL in your computer.

You will need Web Browser like Google Chrome or Mozilla to run your web pages.

We suggest you to use any of the following tools to Install Server for PHP and MySql in your PC or laptop:

  1. XAMPP –
  2. AMPPS –

XAMPP is commonly used for running PHP websites in local server but AMPPS is also as efficient as XAMPP.

These tools will install all resources needed to run PHP in Local Server.

After Installing XAMPP you will get a folder in your default drive (or chosen drive while installing) named XAMPP.



Inside XAMPP folder you will find configuration files for all resources which you can see in this image.

Tools needed to Run PHP in local server

Inside the XAMPP folder you will see HTDOCS folder. This HTDOCS folder is the root folder of your local website hosting.

step by step php tutorial

Directories created within HTDOCS folder will represent new Websites.

For Example: If you will create a directory named SLIDESCOPE in your HTDOCS folder then inside the SLIDESCOPE named folder you will put your web pages and files.

After Installing XAMPP you will find XAMPP CONTROL PANEL in your computer. It looks like this:





Yu can see that it is showing the Operating System Details and the status of APACHE and MYSQL server.

In order to run PHP and MySql you have to start the APACHE and MySQL in control panel.

BySlide Scope

Step By Step PHP Tutorial – Part 1 – Introduction

  • PHP is a server side scripting language and it stands for Hypertext Pre-Processor. Originally PHP was called “Personal Home Page”.
  • PHP was created by Rasmus Lerdorf in the year 1994.
  • PHP was primarily developed for Web Development Purpose.
  • PHP can be used to post and retrieve data from one html form on any other page.
  • You can insert PHP code inside HTML or HTML code Inside PHP code.
  • Knowledge of Basic HTML and CSS is preferred to learn PHP.
  • Syntax of PHP is very easy to learn. If you are familiar with C Programming language then you will be able to understand PHP easily.
  • PHP is not a client side programming language which means that it cannot run without a server.
  • APACHE server can be used to test and run PHP.
  • PHP is an open-source programming language. It has a huge community of users and hence it has a lot of support.
  • PHP can be used in a Procedural Programming Style and Object Oriented Programming Style.
  • Beginners will start with Learning Procedural Style and then OOPs style.
  • Websites like Stackoverflow and can be used to get solutions to any problem related to PHP.
  • A server side scripting language like PHP can be used to communicate with the database directly.
  • It can be used to Create, Read, Update and Delete records of a database.
  • Database is used to store data in tables. Tables have columns that are named as per the data which will be stored n them.
  • MYSQL database is commonly used with PHP and we will learn MySql in this tutorial as well.
  • PHP can be used to Create, Read and Delete files on targeted folders and directories.
  • PHP is the backbone of many popular CMS tools like WordPress, Drupal, Magento etc. After learning PHP you will be able to configure above mentioned CMS scripts to any extent.
  • PHP can be used to set and access Cookies and Sessions. It is helpful in creating Login and Signup Based User Management Systems.
  • You can use PHP to encrypt data.

This is a Step By Step PHP Tutorial & In this introduction part of PHP we have covered some common points that a students or a beginner must know about PHP before learning it.

Some point may have not been covered in the introduction section but you will find them in the newer parts of this tutorial.

See this Video Which is a Step by Step Video Tutorial for PHP

If you have any doubts or feedback related to this introduction, you can comment below.

BySlide Scope

How to use openweathermap api with PHP

Openweathermap api with PHP

In this tutorial we are going to discuss about a useful API from Its API can be used to display Current weather and 13 day Forecast data.

It displays following data:

  • Minimum Temperature
  • Maximum Temperature
  • Wind Speed
  • Humidity Value
  • Weather Condition and other details.

Using PHP to Develop your own weather checking website :

Step 1 – Go to and register to get your free or paid api key (app_id).

Step 2 – Create a PHP file and write HTML code for a Simple Form.

<form method=”post”>

<label for=”city”>

Enter Location Name :


<input class=”form-control” id=”searchTextField” name=”city” placeholder=”Enter a location” autocomplete=”on”>

<!–<label for=”cc”>

Country Code (Eg: IN for India):


<input class=”form-control” name=”cc”>–>

<button class=”btn btn-success” type=”submit” name=”sub”>View</button>


Using the form given above users will enter the name of their city.

Step – 3 Write the following php code:


                if (isset($_POST[‘sub’])){

$city = $_POST[‘city’];

$country = $_POST[‘cc’];


//Replace your API key with your key.

//When user will submit the query, $_POST variable will be set and you have supply these variable in the url.

//The above given url produced JSON output. Now write:



echo “<h2>Current Temperature in ” . $city . ” is :<button class=’btn btn-success’>” . $data[‘main’][‘temp’] . “&#176; Celcius</button></h2>”;

echo “<h2>Wind Speed is :<u>” . $data[‘wind’][‘speed’] . “</u> KMPH</h2>”;

echo “<h2>Humidity is :<u>” . $data[‘main’][‘humidity’] . “</u> %</h2>”;


echo  “<h2>Weather condition:<u>” . $data[‘weather’][0][‘main’]  . “</u>”;


echo “<img src=’” .$data[‘weather’][0][‘icon’]. “.png’ width=’90’ height=’90’></h2>”;


You will see a form and when you will enter name of any city in the Input field and hit enter your application will get the data from following JSON:

In this example we have checked our URL with “Lucknow”.

This is a pretty json output:

  "coord": {
    "lon": 80.92,
    "lat": 26.85
  "weather": [
      "id": 721,
      "main": "Haze",
      "description": "haze",
      "icon": "50d"
  "base": "stations",
  "main": {
    "temp": 40,
    "pressure": 1005,
    "humidity": 16,
    "temp_min": 40,
    "temp_max": 40
  "visibility": 3000,
  "wind": {
    "speed": 1
  "clouds": {
    "all": 0
  "dt": 1492077600,
  "sys": {
    "type": 1,
    "id": 7817,
    "message": 0.0125,
    "country": "IN",
    "sunrise": 1492042451,
    "sunset": 1492088381
  "id": 1264733,
  "name": "Lucknow",
  "cod": 200

You can see Live Demo at this URL :


BySlide Scope

Codeigniter training in Lucknow

Codeigniter Training is for Web Developers with knowledge of core / basic php and Object Oriented Programming concepts.

What is Codeigniter ?

Codeigniter is a PHP framework for developing Web Applications quickly and more professionally. It is used by millions of developers across the globe.

Why Codeigniter ?

  • Codeigniter is Open Source.
  • It is light weight.
  • It used very Less resources on the server.
  • Documentation of Codeigniter on it’s official website is easy to understand and very strong.
  • Codeigniter is backed by a large community of Users. Help topics, tutorials and good trainers are easily available.
  • Many organizations are using Codeigniter and looking for professionals with sound knowledge of Codeigniter.

Who can do Codeigniter Training ?

People with knowledge of Basic / Core PHP and Object Oriented Programming Concepts can learn Codeigniter easily.

Candidates who want to build a career in web development (using PHP) can learn Codeigniter.

Where to Learn Codeigniter ?

  • You can learn codeigniter in Online and Classroom training module by Slidescope PHP Training
  • You will learn everything from scratch.
  • You will work on live projects while learning.
  • You will learn database management – like done in large enterprises.


BySlide Scope

PHP Training Lucknow for Core and Advanced PHP Course

Php is an open source Server Side Scripting Language used by many web developers and companies to develop basic and advanced web applications. You can learn Php to create fast web applications and you don’t need to pay any amount to install and setup the tools that are required to learn Php because it is opens source.

Many free tools are available to run and test php scripts on your Personal Computer or Laptop.

If you are familiar with Java Coding or C#(Sharp) coding then understanding Php will not be difficult for you.

If you are fairly new to the world of coding then also you can learn creating applications in php in 2 to 3 months.

There are various tutorials, books and articles available on internet which can help you in learning Php on your own.

If you are familiar with the basics of programming, learning online will not be difficult for you but Guidance of a professional trainer is always important because a trainer will explain you things practically and you will get experience of working on the Live Projects. A trainer can explain you the core concepts in detail.

We are associated with Best Php Training Institute in Lucknow, which is a great institute with 10 + years of computer languages coaching experience .

Contact PHP Training in Lucknow & Kanpur-

9807987289, 9454241494, 8604000569, 9696820568

Syllabus of PHP Training Course:

  • Basics of PHP
  • Basics of HTML, CSS and JS
  • Installing PHP on Computer
  • Printing Statements in PHP
  • Variables in PHP
  • Conditions in PHP
  • Operators in PHP
  • Loops in PHP
  • Arrays in PHP
  • String Functions
  • Sessions in PHP
  • MySql Database Introduction
  • Connecting PHP Application to Database
  • CRUD Operations in PHP
  • Publishing Application to Web Hosting

You can learn Core and Advanced Php from Php Training Institute – Lucknow with working experience on Live projects.

A complete training with Database Management and Database Logic on MySql with complete understanding of  Business Logic.

Learn Documentation of Small, Medium and Large Scale projects.

Learn advanced usage of Roles, Sessions, Cookies etc.

Learn Advanced Php using frameworks like Codeigniter.

Learn creating frameworks based on Model View Controller

Fill this Simple Form to Contact us :

Php Training in Lucknow Address

Asha Complex, C Block Indira Nagar, Lucknow, Uttar Pradesh

Php Training in Kanpur Address

Near Rama Devi Churaha, Kanpur, Uttar Pradesh

Call Now – 8604 000 569, 9807 987 289