In this post you will learn how to send doc attachment, pdf attachment any file attached in your php email. You can send a file through php mail function using HTML form in PHP. Firstly you have to create simple ...
phpsupport | phpsupportdesk Latest Articles
How to upload zip file in php?
pHpSupportIn this post you will learn how to upload zip file into a folder using HTML form in PHP. Firstly you have to create simple HTML form. HTML Code <form action=“upload.php” enctype=“multipart/form-data” method=”post”> <input type=“file” name=“zipFile” accept=“zip/*”> <input type=“submit” name=“Submit” ...
How can we check current date & time of PHP server?
pHpSupportWe can check the PHP server time by using the following code date(“Y-m-d H:i:s”);
Tips to remove file from server – PHP
pHpSupportIn 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 ...
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 => ...