hi
here i used like this
$a='<script type="text/javascript"> document.write(Date()) </script>';
echo "$a";
now its working.
but i want to store this variable into mysql database.
In what data type????should i store in database???????
Hi Hemashiki,
You haven't given us much info to go on. You said you wanted to store the users current time in the database, then ask if you should. That all depends on what your application is supposed to do. Are you requirements that your database store the users current time? If so, then yes you should store it. MySQL has a few different date / time datatypes.
Check This Out
You could expand the above code by doing this:
[PHP]$a='<script type="text/javascript"> document.write(Date()) </script>';
$sql = "INSERT INTO myTable VALUES ('$a');";
$result=mysql_query($sql);[/PHP]
You wouldn't need to auto populate and form fields or auto submit anything, just handle it all on the server and you'll be good to go.
If this doesn't answer your question, post more info on what your app is supposed to do, and we can probably help you out.
Thanks,
Greg