Posts

Showing posts from 2017

Change column position in mysql table

Here is the syntax in which i change column position in mysql table. ALTER TABLE table_name MODIFY password varchar(20) AFTER id;

Prevent multiple hitting while submitting form

There are several solutions to this problem: 1. Use Javascript to disable the form's submit button when it is posted.   Downside to this is that this is ABSOLUTELY not a foolproof way. It's very easy to submit forms without actually clicking the button, and this would also not work for users with JavaScript disabled.  I would definitely not recommend this method. Example: < script language=" javascript "> <!-- function disableSubmitButton () { // you may fill in the blanks :) } --> </script> <form action="foo.php" method="post"> <input type="text" name="bar" /> <input type="submit" value="Save" onclick =" disableSubmitButton ();"> </form> 2. Use   PHP sessions  to set a session variable (for example $_SESSION[' posttimer ']) to the current timestamp on post.   Before actually processing the form in PHP, check if the $_SESSION['post...

Easy Way to download cakephp 3.0

    Installation step in cakephp 3.0      Installing Composer        CakePHP uses Composer, a dependency management tool, as the officially        supported method for  installation. Installing Composer on Linux and macOS Run the installer script as described in the official Composer documentation and follow the instructions to install Composer. Execute the following command to move the composer.phar to a directory that is in your path: mv composer . phar / usr / local / bin / composer Installing Composer on Windows For Windows systems, you can download Composer’s Windows installer. Create a CakePHP Project Now that you’ve downloaded and installed Composer, let’s say you want to create a new CakePHP application into my_app_name folder. For this just run the following composer command: php composer.phar create-project --prefer-dist cakephp/app my_app_name ...