Here’s how you add and subtract dates from one another. For example, this simple code can calculate what the date will be 2 weeks before or after 1998-08-14 (yyyy-mm-dd).
Subtracting days from a date
The following example will subtract 3 days from 1998-08-14. The result will be 1998-08-11.
View Code PHP1
2
3
4
5
$date = "1998-08-14";
$newdate = strtotime ( ‘-3 day’ [...]
Maruf scribbled this post.
I’ve put together a simple AJAX contact form, using the Jquery library (my personal favourite).
What does this all mean? Well, it’s basically a contact form which validates and submits an email without the page refreshing. You can see an example on our contact page.
The example i’m providing for download is extremely simple. If you [...]
Maruf scribbled this post.
This Javascript form effect basically removes the default value (e.g Your Name) when the input field is on focus. If nothing is entered, and focus is taken away from the input field, the value is displayed again.
It’s a pretty cool effect, which I’m always using on a lot of projects. Here’s an example (click [...]
Maruf scribbled this post.
BrightCherry have glady released multiple Free Wordpress Themes, and happily provided support to anyone who has required it. We like building the themes; we enjoy watching people use them, and we enjoy helping people get to grips with Wordpress.
However, we’ve noticed that a lot of our theme users have been discrediting our work by removing [...]
Maruf scribbled this post.
Earlier today I needed to find out if a file exists on a different domain. Initially I used the file_exists function, but then when that threw back an error I remembered that file_exists only checks whether a file or directory exists on the same server as the script.
After I played around with various functions, I [...]
Maruf scribbled this post.