Featured
-
Top 5 Features That Make Laravel the Best PHP Framework for Development
Laravel is a free open source Web Framework of PHP
by abhishek.tiwari.458 -
Best 5 Lightweight PHP Frameworks for REST APIs Development
Are you ready to develop the Rest AP
by ankur.kumar -
PHP: Full-Stack Framework vs Micro Framework
A web framework can be described as a software fra
by ankit.bhatia -
How to get facebook profile picture by Facebook App
If you would like to get your profile picture in f
by vivek.rastogi -
Creating RESTful API in cakephp
This tutorial will help you to learn how to create
by pushpendra.rawat
Tags
How to Make MyFriends Query in MySQL?
Hello readers!
If you are developing the web based friendship structure, Then in this blog we will help you to make myfriends query with database.
Let's suppose you have database in following structure
ID
senderM...
How to sort column by clicking on column header iin PHP
Below code will gives us a table on which when we first time click the headers of column, it display data in ascending order. if we click the header second time than it display values in descending order.
<?php...
How to fetch data from database in PHP
For fetching data from database in php, first we have to create a connection from database by using following code.
<?php
$servername = "localhost";
$username = "root";
$password = "pass";
$database = "demo"; //this wi...
Insert data into database from form in PHP
Below is a form which contain id field, name field, phone number filed, gender radio button and we are sending these data by using post method.
<form name="user_registration" method="post" >
Name: <input type="text" name...
How to get the colomn name of table using MySql
Hello Reader's, If you have to get the only names of columns of table then see the code below:-
You can use following query for MYSQL:-
SHOW columns FROM your-table;
Below is the example code which shows How to implement above syntax in ph...
Use of '@' in PHP
Hello Reader!, You might have seen people using the '@' in the PHP coding. The operator '@' is used when you don't want to show the error messages even if they occur.
By using '@' the errors will be hidden.
Let's see the two syntax below:-
...
Create Update, Delete and Insert Functions
Hello,
Here I am writing the code to create update, insert and delete functions so that we can use it the same functions anywhere in the project.
<?php
// function to insert data
function insert($table = "", $fieldsArray = array()) {...
How to connect to your MySQL database from a PHP Script
Create simple Mysql connection with the help of PHP code
<?php
$hostname = 'localhost'; //define the hostname here
$username = 'root'; //define the username here
$password = ' '; ...