Write a program to find the factorial of a number. Factorial of a number is the product of numbers from 1 to ‘n’. Eg:- 5! = 1*2*3*4*5 = 120 PHP :- Declare the number to $n Set $product as 1 In a for loop, loop through 1 to $n Inside the for loop, multiply $i […]
jQuery Toggle() Method
How to do jquery Toggle() method to show/hide onclick The jQuery toggle() method is used to toggle between the hide() and show() method. It shows the hidden elements and hides the shown element. HTML : Specify a button with an id along with a div containg the text. Also specify an id for the div. […]
Get current Date in javascript
How to get current date in javascript? Date() is a feature of javascript. Check the full date feature here. Date objects are created with the new Date() constructor. By default, JavaScript will use the browser’s time zone and display a date as a full text string: for eg:- Tue Dec 29 2020 23:07:27 GMT+0530 (India Standard Time) […]
Create folder using php
How to create folder using php. Use mkdir() function to create new folder using php. We can also specify the full path to create folder as follows, Here 0777 is specified to give the permission. Click here to check more about file permissions. For more php related queries check this link
Create CSV file with php
How to create csv file with php? Generating csv file with php and download it. In this article we will discuss about how to create CSV file with php. Rather than creating csv file we will also download the same. This is achieved by the help of fputcsv() function. It formats a line as csv […]
Sending Emails using PHP
Sending emails using php can be done by the mail() function. If you are looking for codeigniter mail function please click here. In this article we will discuss sending emails using php. It can be done by the php mail() function. The mail() function requires three mandatory parameters: to address, subject of mail and the […]
Send mail in CodeIgniter
How to send mail in CodeIgniter using the normal mail() email library. We can send mail in codeigniter using the mail() and SMTP methods. To know how to send mail using SMTP click this link – sending smtp mail in codeigniter. The mail() is the simplest method to send mail in codeigniter. Controller : create […]
Sending SMTP mail in CodeIgniter
How to send SMTP mail in CodeIgniter ? We have normal mail() function in CodeIgniter but in some servers we may have to send emails using SMTP method. So in this article we will discuss how to send SMTP mail in CodeIgniter. To check sending mail in codeigniter goto this link. SMTP stands for Simple […]
PHP form submit on same page
How to do PHP form submit on same page. On submitting the form stay on same page. In this article we’ll discuss php form submit on same page. There are two ways to submit a form using php, either on the same page or to a php script. To submit a form on the same […]
Upload Base64 image PHP
How to upload base64 image php? Uploading base64 encoded image in php. In this article we will discuss about how to upload a base64 encoded image in php by specifying the url. If you want to upload an image from url checkout this link upload image from url. HTML : Create a form with method […]