Bootstrap Toggle Adding Dynamic Elements

If you are adding elements to your page dynamically you will may run into issues with Bootstrap Toggle.I was adding toggles, each with uniquie ids.Hopefully this will help; // destroy all toggles beginning with 'my-toggle' $("input[id^='my-toggle']").bootstrapToggle('destroy'); // re-initialise the toggles $("input[id^='my-toggle']").bootstrapToggl...
Continue reading
  603 Hits

JQuery Validate Multiple Dynamic Inputs

I'm using this great jQuery Validation Plugin to validate my form, and some dynamic inputs that users can add when clicking a button.I add new dynamic inputs and they all share the same name, this is because I want to send these values as an array to PHP. For example;//HTML<input type="text" name="test[]"><input type="text" name=...
Continue reading
  931 Hits

MySQL Check All Tables in Database

If you need to check (not repair) all your tables at once , run the following command in your shell;mysqlcheck -h hostname -u username -p -A -c You will be prompted to enter the password.-A means check all databases -c means Click here to view how to repair all tables.
  557 Hits

Git Ignore All Except Some Files

If you already have a .gitignore file with rules, you can change them.My .gitignore looked like this;#ignore these foldersscripts/lib/**logs/# ignore these files.sql Let's say you now want to include a file located at /lib/config.php. You would add this line;#ignore these foldersscripts/lib/**logs/# ignore these files.sql# allow!lib/config.php Next...
Continue reading
  570 Hits

Why So Small Input Boxes?

Building a website recently I noticed that if I have 'php_flag display_errors on' then all the input boxes on the website appear much smaller. It's almost as if the CSS was broken.. still haven't found a reason why this happens...

Just comment out the .htaccess like below;

#php_flag display_errors on

  966 Hits

PhpMyAdmin Invalid Column Count in CSV input on line 1

If you are receiving this error while tryng to import a CSV file, make sure that the number of columns in your CSV matches that of your existing database table.I had an existing table with 10 columns, the first column was `id` an auto-increment field. I omitted this from my CSV file presuming it would be auto geberated but it's not.number of c...
Continue reading
  11582 Hits