Calculating past and future dates in PHP
A nice article on how to calculate past and future dates in PHP is available at: http://www.the-art-of-web.com/php/strtotime/
A nice article on how to calculate past and future dates in PHP is available at: http://www.the-art-of-web.com/php/strtotime/
How to get a value from a table using functions and return count: Write a simple query and pass the parameters: function somename($tablename, $colnam, $colvalue, $mode, $returncolnam) { Select $returncolnam from $tablenam where $colnam=$colval } Note: For $returncolnam you can also use array number starting from 0.
When we search a column in MySQL we use where condition. When we have many records separated by a ‘,’ in a column then searching it becomes bit complex. We can search using like function. It will be clear by taking an example: Let say we have a record with value – 1,2,3,4,5,6,7,8,9,10,11,12 We want … Read more
Username as we call it is an online identifier for a user on a website. For some sites it is your email address and for others it is this name, the Username. With a Username one can login into a website (of course password is required too), basically Username identifies you for a website. Now … Read more
Hard to guess, easy to remember is the key rule. While choosing a password one should always remember that it should not be too obvious for people who know you to guess it out. It generally said that your password should be your name, last name, nick name, username etc. Most sites now prevent you … Read more
You can check domain name availability of a domain name by using following code. If you want to check multiple domains for same extension modify this code by calling function again. To check different extensions you need to specify Server Name and Matching Criteria for that extension. Pass values in $server and $nomatch [php] <?php … Read more
A tree structure means nodes within nodes. By using MySQL and PHP you can read a database then fetch records recursively. By taking an example we can understand it better. There is a table Category with records for categories and sub-categories. There are 3 columns: Id, Name, Parent Id and records are: [php] 1, A, … Read more
In Pagination you can distribute number of records on different pages and specify links so that user can go from one page to next page. Generally what user see is First, Previous, Next, Last links along with few page numbers like 1,2,3,4,5 and if he is on page 9 then something like 7,8,9,10,11 or 9,10,11,12,13 … Read more
Pagination in PHP is easy and you can show pagination by following code. There are 4 files (don’t go to the number of files, separate sfiles have been created so that you can easily understand the code), I could have combined it in 1 but 4 seems to be better. These are: index.php, paging.php, function.php, … Read more
I am a web developer and design websites for personal use. After watching the movie Social Network (though I watched it a bit late and my friends who watched it earlier then I did, had called me up to watch this movie as soon as I can, as they thought I could relate myself to … Read more