In php a multiple-value form element such as checkbox is named suffixed with a set of square brackets. For example, My commonly used colors are: <form action=”index.php” name=”myform” method=”post” onsubmit=”return validate_form();”> <input type=”checkbox” name=”colors[]” value=”red” /> <input type=”checkbox” name=”colors[]” value=”green”…
Category: PHP
Choosing a business listing directory script written in php
How to Choose a business listing directory script written or coded in PHP programming language I got a new client today who wanted a brand new website equipped with business listing directory feature. According to him, the script should be…
phpMyAdmin PHP Code Injection Exploit attempt on my server
This morning, when i checked my Give Back India site’s access log i found some scripts/setup.php request attempts. In fact, not ‘some’ but hundreds of them. All requests were made targeting phpMyAdmin’ installations on my server. Here are a few…
Converting a text string into comma separated words
Today, i was looking at some old code of mine to find something when i found this little but useful piece of code which i had written for one of my old projects (and of course when i didn’t had…
Setting up a catch-all email forwarder and parsing emails using php
In one of my ongoing projects i had to set up a “catch-all” email parsing script. Here’s how it came out to be. What is catch-all? In the context of emails, “catch-all” refers to a destination to which all incoming…
Form DOM element not recognized (created) in ajax form in IE when placed with end tag missing
Skipping a form end tag </form> costed me almost a day (i had to go to bed abandoning the fixing for some time though;)). I had been using ajaxForm with jQuery to submit ajax form which was placed on a…
Setting execution time and memory limits in php
When executing large amount of data through php scripts it is common facing errors like “Fatal error: Maximum execution time of 300 seconds exceeded..”. Also, sometimes uploading large files through php scripts you might face errors like “The uploaded file…
Better way to write php code – part 2
With the help of an example i would explain a very common but erroneous approach new php developers seem to follow (i have seen some ‘old’ ones repeating the same error though). Here it is,
Better way to write php code – part 1
A few tips on writing php code that can save a php developer a lot of future troubles and “huffs and puffs” occurring due to different php compiler settings, changing of hosting environment etc. Here is first one.
Clear template cache in x-cart
Have you been making changing into a smarty template file (within x-cart and perhaps independently as well) for long and the changes would not come up at all? Who could tell better how frustrating this can be! The simplest and…