I have written a script for getting the files list from directory and redirecting the page on selecting option from the select box. So you will get the script for fetching all the files from current directory and redirecting page on selection.
Category: PHP/MySQL
All content related to PHP and MySQL
Database Backup
I am listing here the PHP script to generate backup of database. For saving the file with ‘sql’ extension replace the code as specified below at specified line numbers in the above code (Although ‘zip’ file will take less space). You can also set cron jobs for dumping databdase in the cpanel of your site. […]
Get IP Address in PHP
Many times we need the IP Address of the User visiting our website in our Application. I am listing here the method to get the User IP Address, hope it might be useful to many of you.
Assign PHP Array to Javascript Array
I am describing here a very useful method for getting the values of a PHP array in JavaScript. For this we need to assign the PHP array values to a array in JavaScript.
Copy Directory
I am listing here the method to copy full Directories with all sub-directories and files.
Display numeric in words
I hope this script will be very useful to all of you who are working in PHP. Actually this is a kind of small and useful project. I was asked to develop a script for displaying sum total in words in one of my interviews, at that time I could not complete this script. So […]
encode and decode string with base64
Many use encoding and decoding on daily basis including me, so once I made a simple script for encoding and decoding the input string with base64. base64.txt Instruction: 1) Download the file and save the text file as PHP file. 2) Place the file in your root directory. 3) Execute the file from browser. 4) […]
ASCII example
You might have visited many sites related to songs or movies, you might have noticed that the searching is in Alphabetical order, so what will you do if you want such listing, write all the characters from A to Z ?. There is an easy way for implementing this in PHP. We can use function […]
Set Default Time Zone
Some of you may have faced the issue for converting timezone for displaying date and time. Means suppose you want to display current time in India, than what will you do for that. You might have added 5 hours and 30 minutes to the default time. But there is already a functionality for that in […]
List Date Difference
Some of you might have come across the requirement for displaying all the dates between give two dates, especially for drop down listing of dates. I have developed a sample code for getting all date ocurrences between give two dates. You can change the date and modify the code as per you requirement.