Hi, I have been breaking my head to solve this. May be this is very simple. I am trying to convert date value to string and to merge with another string. $dt=$_POST['formdate']; //$dt is in format of Y-m-d $msg = "The date entered is ".$dt; echo $msg; Code (markup): But it is printing $dt as blank. Please help me. Thanks in advance. Kiran
Thanks for responding. It prints normally as date format Array ( [formdate] => 2010-08-24 ...) //$dt is in format of Y-m-d (also edited in first post) Kiran
This shouldn't happen. Either $_POST['formdate'] isn't passed correctly (check spelling of variable names) or you are changing it someplace (probably used an assignment state = instead of a checker ==).
Yes!! You are right ThePHPMaster. It's my mistake on using different variable. The problem arose as I use two forms on the same page. A quick check on the script resolved the issue. Thanks much Kiran
This seems absolutely fine to me ... you don't need to convert numeric variables in PHP to a string in this case ... when you merge it, this is automatically done. Maybe the name of the cell "formdate" is not correct??