PHP-MySQL | Transaction with commit and rollback try { // First of all, let's begin a transaction $db->beginTransaction(); // A set of queries; if one fails, an exception should be thrown which we are handling at …

Last updated 7 years ago | 1737 views

Tags:- PHP PHP-MySQL

MySQL | What is the best collation to use for MySQL? Mostly we use: utf8_general_ci utf8_unicode_ci utf8_general_ci is used for fast sorting but it is less accurate whereas utf8_unicode_ci is used for better accuracy but …

Last updated 7 years ago | 2382 views

Tags:- MySQL

The three different way in PHP to connect with MySQL is: MySQL MySQLI PDO Note: We should use MySQLI because MySQLI is imporoved version of MySQL and have more function then MySQL.

Last updated 7 years ago | 2449 views

Tags:- MySQL

session_id() function There is a function session_id() in php which is use to get and/or set the current session id. string session_id ([ string $id ] ) for getting session id in php we have to …

Last updated 7 years, 1 month ago | 4221 views

Tags:- PHP

PHP | What are default session times in PHP? By default, session variables last until the user closes the browser or leaves the site otherwise most of the server terminates the session variable if you …

Last updated 7 years, 1 month ago | 2370 views

Tags:- PHP

PHP | strip_tags() function strip_tags() function is use to remove HTML, XML, and PHP tags from string. The function provides you the ability to remove tags from strings. You can also ignore certain tags by …

Last updated 7 years, 1 month ago | 2508 views

Tags:- PHP

PHP | unset() function The function unset() is an inbuilt function in in php which is use to delete variable. unset($var) or void unset ( mixed $var [, mixed $... ] ) Note: we can …

Last updated 7 years, 1 month ago | 2354 views

Tags:- PHP

PHP | Unlink() function The unlink() function is an inbuilt function in PHP that is used to delete the file from a directory. If the file function executes successfully and deletes the file then it …

Last updated 7 years, 1 month ago | 2776 views

Tags:- PHP

PayPal | Notify url and Return url Both of these are used in PayPal payment gateway integration. Notify url is used by paypal to send response regarding current transaction in other word notify about the …

Last updated 7 years, 1 month ago | 4867 views

Tags:- PHP PayPal

unlink() and unset() The unlink() and unset() function in php have same functionality (i.e.: delete) but the difference is in the type of data on which they are applied to perform such delete functionalities. unlink() …

Last updated 7 years, 1 month ago | 2903 views

Tags:- PHP

JQuery | Ajax is sending GET instead of POST  It's a very common problem which is faced by most of the new programer. In Ajax code, new learners use (type: "POST") yet the sending request went …

Last updated 7 years, 1 month ago | 9791 views

Tags:- JQuery Ajax

PHP | Inheritance PHP mainly supports two types of inheritance: Single inheritance Multilevel inheritance

Last updated 7 years, 1 month ago | 2316 views

Tags:- PHP

PHP | array_push() function We can add elements to an array in an easy way. There is an inbuilt function array_push() in PHP which is used to add elements to the PHP array. With the …

Last updated 7 years, 1 month ago | 2176 views

Tags:- PHP

PHP | Download pdf file To download a pdf file in PHP, we need to use the header() function. In the header() function, we need to pass "Content-Disposition" which is used to supply a recommended filename …

Last updated 7 years, 1 month ago | 2859 views

Tags:- PHP

PHP | header() function By sending the headers bellow, we change the browser’s default cache settings. We can override any of those settings and force the browser to not cache. In this code we just …

Last updated 7 years, 1 month ago | 2345 views

Tags:- PHP