0

Good day all:

I have a mysql insert statement inserting data to db. The value of one of the variables is:

' $_POST[servicedesc]')

I want to be able to append the current date and time in front of this value and then insert into the db. This value will be inserted into a text field so I would like to have the date and time on a line different than the value.

Any thoughts on this!
Mossa

Edited by mbarandao: n/a

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by mbarandao
0
$time = mysql_fetch_array(mysql_query("select now()"));
echo $time['now()'];

You can use the $time variable to add the current server time.

0

Problem resolved!

Thank you all that posted replies. Here is the solution that is working for me based on my initial post --hope it helps someone else!

CONCAT(NOW(), '\n\n' '$_POST[servicedesc]','\n\n----End of Service Report---'))";

The very best!
Mossa

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.