Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Question regarding date strtotime function
Old 02-07-2008, 08:02 PM Question regarding date strtotime function
Experienced Talker

Posts: 36
Trades: 0
Code:
<input type='text' name='en_ch_date' value='<? echo date(("Ymd"), strtotime("-3 days")); ?>'>
This correctly outputs 20080204 with today being 20080207.

I want to put a variable in for -3 which will change but currently has a value of 100. How do I go about putting a variable in this function?
nlassiter is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-07-2008, 08:33 PM Re: Question regarding date strtotime function
Experienced Talker

Posts: 36
Trades: 0
Also how would you add the date() function in a sql query?
Code:
 VALUES ('$_POST[mach_id]','Engine Oil','date("Ymd")','$_POST[en_ch_hours]')";
nlassiter is offline
Reply With Quote
View Public Profile
 
Old 02-12-2008, 04:42 PM Re: Question regarding date strtotime function
Experienced Talker

Posts: 36
Trades: 0
Does anyone know?
nlassiter is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Question regarding date strtotime function
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32238 seconds with 12 queries