# Problem updating date. Urgent help needed

**URL:** <https://forum.kirupa.com/t/problem-updating-date-urgent-help-needed/281433>\
**Category:** programming\
**Created:** [February 9, 2009, 11:35am UTC](https://forum.kirupa.com/t/problem-updating-date-urgent-help-needed/281433 "2009-02-09T11:35:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![utsav](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@utsav](https://forum.kirupa.com/u/utsav)\
**Post date:** [February 9, 2009, 11:35am UTC](https://forum.kirupa.com/t/problem-updating-date-urgent-help-needed/281433/1 "2009-02-09T11:35:27Z")

</div>

I dunno wht i am doing wrong plz help

my query is

```php

if($_REQUEST['action']=="activate")
 {
  $date2 = date("Y-m-d", time());
  //$mysqldate = date( 'Y-m-d H:i:s', $phpdate );
  //$phpdate = strtotime( $mysqldate );
  if(mysql_query("update members set activated = $date2 and status = 1 where id = {$_REQUEST[id]}"))
  {
   //$myquery = mysql_query("update members set activated = FROM_UNIXTIME($phpdate) and status = 1 where id = {$_REQUEST['id']}");
   //echo $myquery;
   echo "<font color='red'/>
 The Member has been activated. $date2 - $_REQUEST[id]</font>";
  }
  else
  {
   echo " Could Not Activate member. Try later. " ;
  }
 }
 

```

It displays " The Member has been activated. 2009-02-09 - 1" so it gives the positive answer but neither does it update status nor date. what do i do?

I even tried using “$date2” but doesnot wrk.
