It is easier to manage classes with its own file. If you create an email class then it should be saved in a file named mailer.php This class may need many other classes, the problem begins here. Now you must have to include all needed class files in the mailer file to work properly. But if you have a much bigger framework to work with, then it will be hard to manage the long list of file inclusion manually.
In PHP5 we have a solve for this problem. You may define an __autoload function which is automatically called in case you are trying to use a class/interface which hasn’t been defined yet.
The menu is created dynamically from the data inserted in the database earlier. But each time the website displays the menu it need to query the database, fetch the result and create the markup over and over again. This leads to a slower page load. Here comes the utility of caching. Generally the main menu is not changed frequently. So the HTML created by PHP may be saved in server and served to the client without any dynamic rebuilding. This will speed up page load time. After a predefined frequency the cache will be rebuilt automatically. Thus the change made to the database will be reflected in the main menu. The attached version of the menu is caching enabled. Test the difference between the previous version (http://layzend.info/2011/06/20/multi-level-category-management-part-3/) where caching is not enabled.
We have already solved the main problem of adding, editing, deleting multilevel categories into a database table. Now when we have a lot of data in the table, we must show them in a multilevel fashion also. Here is a solve for this thing. I have used the beautiful jQuery apycom menu. The calling of the function is very straight forward. Include the new “lzmlm.php” file shared with this post. Visit http://apycom.com where you can get a lot of beautiful menu. Download the menu of your choice and extract the zip file inside “js/jquery/plugins”. Include “menu.js” and “menu.css” in your current file where you want to place the menu. Now call the following function to render the menu in your desired position.
Authentication is a process by which you can verify if someone is that user who he claims to be. This usually involves a username and a password, but can include any other method of demonstrating identity and other extra conditions.
The identity (username) is compared to the credential (password) from a database table with credential treatments (Like PASSWORD,MD5,SHA1 etc). Depending on the match he is determined to be logged in or not. The identity and credential are taken from the identityColumn and credentialColumn form the proper table in the database. Read the rest of this entry
Read the rest of this entry