How can we get the current session id in PHP?
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 …
Clear the TINYMCE editor's content using jquery.
JQuery | TinyMCE | Clear TINYMCE editor There is a method called setContent() in TINTMCE which you can use to reset/clear the TINTMCE editor. <script> // if one editor existing in your page. tinyMCE.activeEditor.setContent(''); </script> …
What are the difference between Notify url and Return url?
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 …
Django rest framework authentication error “ TypeError: 'type' object is not iterable ”
Django rest framework authentication error “ TypeError: 'type' object is not iterable ” This error comes because "authentication_classes" expecting an iterable(list/tuple) but somehow it is getting something else. So it needs to check a few …
Write a example code showing the nested ternary conditional operator in PHP?
PHP | Nested ternary conditional operator An example code showing the nested ternary conditional operator in PHP. <?php $background_color = ($num == 0 ? 'blue' : ($num > 0 ? 'green' : 'red')); ?> Here …
Write an SQL query to find names of employee start with 'A'?
SQL | LIKE operator The LIKE operator of SQL is used for such kind of operations. It is used to fetch filtered data by searching for a particular pattern in where clause. The Syntax for …
How to make an anchor tag to do nothing?
HTML | Make an anchor tag to do nothing | href="javascript:void(0);" To prevent reloading a page when a link clicked is something like preventing the default behavior of an element. It can be achieved by providing …
How to Add a Cron Job via SSH?
SSH | Add a Cron Job A corn is a time based job scheduler which runs automatically on unix-like server. It is use to schedule jobs or tasks to runs at fixted date, time or …
How to remove index.php in codeigniter?
Codeigniter | Remove index.php from URL in Codeigniter? The file index.php is the root file of Codeigniter. it contains setting code for CodeIgniter. So, when we redirect to other pages the URL comes with index.php …
What is difference between strstr() and stristr() function ?
strstr() and stristr() strstr() and stristr() both are use to find first occurence of a string, but the differences are strstr( ) is case sensitive where as stristr( ) is case insensitive. strstr() – …
Print html page with css
JQuery | Print HTML page with CSS printThis is a jquery library which can print specific or multiple DOM element without losing css style. Features Print specific & multiple DOM elements Preserve page CSS/styling or add …
How will you check if a file exists or not using PHP?
PHP | file_exists( ) Function The file's existence can be confirmed using the file_exist() function which takes the file name as an argument. file_exist("abc.jpg") The file_exists() function is an inbuilt function in PHP that …
What is the default URL pattern used in Codeigniter framework?
Codeigniter | The default URL pattern In CodeIgniter, URLs are designed to be search-engine and user-friendly. CodeIgniter uses a segment-based approach rather than using a "query string" based approach. http://www.example.com/user/edit/rakesh The default URL pattern in …
What is php.ini and .htaccess file?
php.ini and .htaccess file Both php.ini and .htaccess file is the configuration file. php.ini: It is a configuration file for php setting. It is a special file by which you can make changes in PHP …
What is session in php?
Session in php A session is a global variable which is used to store users/sensitive information on the server. Each session register a unique session id which is use to fetch stored value. Session store …