In this post you will learn some basics to remove file from server. Please check the code given below. This will help. You just need to use the following function Unlink(FILENAME); Here FILENAME will be the path of file with ...
phpsupport | phpsupportdesk Latest Articles
Tips for uploading file to server – HTML
pHpSupportIn this post you will learn some basics to upload file to server. The basic idea behind uploading file is to allow user to include whole of the files from their system to form submission. The type of files can ...
To remove class from a div at runtime using jQuery
pHpSupportIn this post you will learn how to remove class from a div at runtime using jQuery. As far as removing div at runtime is concerned, we are to deal with two functions: jQuery.toggleclass() and jQuery.switchclass() functions. jQuery.toggleclass(): This function ...
To add class to a “Div with class” at runtime using jQuery
pHpSupportIn this post you will learn how To add class to a div with class at runtime using jQuery. Please check the code given below. This will help. HTML Code <!doctype html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”Generator” content=””> ...
To add class to a “Div with id” at runtime using jQuery
pHpSupportIn this post you will learn how To add class to a div with id at runtime using jQuery. Please check the code given below. This will help. HTML Code <!doctype html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”Generator” content=””> ...
What is the use of explode in PHP?
pHpSupportIn this post you will learn about the use of explode in PHP. Please check the code given below. This will help. PHP Code Explode breaks the string into pieces(array) $str = “2008/12/10”; // This is a string. I ...
How can we start the session in core php?
pHpSupportIn this post you will learn how to start the session in core php. Please check the code given below. This will help. PHP Code To start a session, you need to add the following code at the top of ...
What is the difference between include and require in PHP?
pHpSupportWhat is the difference between include and require in PHP? Require – If the file is not found, then it will return fatal error and will put a halt on execution. Include – If the file is not found, then ...
To create connection with MySQLi in PHP
pHpSupportIn this post you will learn how to create connection with MySQLi in PHP. Please check the code given below. This will help. PHP Code $host = “localhost”; // Enter your host name $sqlusername = “username”; // MySQL username $sqlpassword ...
Comparison Of Two Dates For Conditions – PHP
pHpSupportIn this post you will learn how to compare two dates in PHP. The best method of this is to change the dates to strtotime. Please check the code given below. This will help. Date Format is YYYY-MM-DD PHP Code ...
How to upload audio file in php?
pHpSupportHow to upload audio file in php? :- In this post you will learn how to upload audio files like: mp3, mp4, etc. using HTML form in PHP. Firstly you have to create simple HTML form. HTML Code <form action=“upload.php” ...
Simple drop down menu with jQuery
pHpSupportHTML Code Simple HTML code <div class=”dropdown“> <a class=”account” >My Account</a><div class=”submenu“> <ul class=”root“> <li ><a href=”#Dashboard” >Dashboard</a></li> <li ><a href=”#Profile” >Profile</a></li> <li ><a href=”#settings“>Settings</a></li> <li ><a href=”#feedback“>Send Feedback</a></li> </ul> </div></div> JavaScript Contains javascipt code. $(“.account”).click(function(){}– account is the ...
PHP string concatenation
pHpSupportJust use . for concatenating. And you missed out the $personCount increment! while ($personCount < 10) { $result .= $personCount . ‘ people’; $personCount++; } echo $result;
How to convert object into Array – PHP
pHpSupportGenerally we sometimes we got stuck while doing coding. I used this function to easily converting object into array if needed. Hope it will help to someone else. function object_to_array($object){ if(is_array($object) || is_object($object)){ $array = array(); foreach($object as $key => ...