I have a form that passes two dates (start and finish) to a PHP script that will add those to a DB. I am having problems validating this. I keep getting the following errors
A non well formed numeric value encountered
This is when I use the following
date("d",$_GET['start_date']);
But when I use the strtotime() function as advised by many sites I get a unix timestamp date of 1/1/1970. Any ideas how I can get the correct date?
Simply you can solve this issue using
strtotime()
function.This helped me a lot -