If a member signs into my site then on sql it inserts the members name , password , date as now().
I created another item on my table called datetr. I want it must calculate +30days from the actual date they sign in (now()) and update the datetr.
Basically I am giving them a 30 day trial and then they need to be blocked if they have not paid.
Maybe you have a better idea to do this.
How to add 30 days to existing date
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hemant SrivastavaRank #581 · 4.2K reputationPosted Feb 4, 2013, 1:42 PM EST
$sql_insert = "INSERT into `users`
(`full_name`,`user_email`,`pwd`,`date`,`datetr`,`users_ip`,`activation_code`,`user_name`
)
VALUES
('$data[full_name]','$usr_email','$sha1pass', GETDATE(), GETDATE() +30, '$user_ip','$activ_code','$user_name'
)
";
If it helps you, pls mark it accepted.
Santhosh Kumar JayaramanRank #563 · 4.3K reputationPosted Jan 29, 2013, 9:05 PM EST
DATEADD(dd, 30, getdate()) This will add 30 days to current dateshabeer shaik40 reputationPosted Jan 30, 2013, 6:13 AM EST
(`full_name`,`user_email`,`pwd`,`date`,`datetr`,`users_ip`,`activation_code`,`user_name`
)
VALUES
('$data[full_name]','$usr_email','$sha1pass',now(),now().AddDays(30),'$user_ip','$activ_code','$user_name'
)
";
How do i use it here