start date insertion for pHP
Moderator: General Moderators
start date insertion for pHP
Heh everyone,
I know very little about this stuff.
I have a question, is it possible to "change" the date on this code as needed.
It's a subscription form and needs a "start date" changed to match the actual calendar date, each time the form is filled out.
Here is the code snippet in question:
<input type="hidden" name="orderPage_transactionType" value="subscription">
<?php InsertSignature("0", "usd") ?>
<?php InsertSubscriptionSignature("20.00", "20070207", "monthly", "12", "true") ?>
<input type="hidden" name="billTo_firstName" value="John">
<input type="hidden" name="billTo_lastName" value="Doe">
<input type="hidden" name="billTo_email" value="jdoe@cybersource.com">
<input type="submit" name="submit" value="Next">
I know very little about this stuff.
I have a question, is it possible to "change" the date on this code as needed.
It's a subscription form and needs a "start date" changed to match the actual calendar date, each time the form is filled out.
Here is the code snippet in question:
<input type="hidden" name="orderPage_transactionType" value="subscription">
<?php InsertSignature("0", "usd") ?>
<?php InsertSubscriptionSignature("20.00", "20070207", "monthly", "12", "true") ?>
<input type="hidden" name="billTo_firstName" value="John">
<input type="hidden" name="billTo_lastName" value="Doe">
<input type="hidden" name="billTo_email" value="jdoe@cybersource.com">
<input type="submit" name="submit" value="Next">
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
If you're too lazy to read, you're not going to get anywhere with PHP. The manual is the reason it's such a friendly language. The documentation describes everything you need in order to do this.
Code: Select all
date('Ymd')it's not a matter of being "lazy", it's a matter of doing something I know nothing about.
I know enough about HTML to get me into trouble and none about PHP.
I am not sure of what to do with that string of code to continue to make it work, but yet make the date change automatically.
I understand what you just sent, but i DO know that certain things have to be placed in strings of code in certain perticular ways.
And I do appreciate your time and effort to make me understand. I admire you coding guys.
I know enough about HTML to get me into trouble and none about PHP.
I am not sure of what to do with that string of code to continue to make it work, but yet make the date change automatically.
I understand what you just sent, but i DO know that certain things have to be placed in strings of code in certain perticular ways.
And I do appreciate your time and effort to make me understand. I admire you coding guys.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Once again, if you read the documentation, you'd know exactly what it is. And, regardless of what you say, it is a matter of laziness. It gives you a table of all of the character values, what they stand for, and what the result will be. All you'd even have to do is skim it to understand.
Y = year, 4 digits
m = month, 2 digits (leading zero)
d = day, 2 digits (leading zero)
So, date('Ymd') return todays date in YYYYMMDD format, which is the format used in the function.
Y = year, 4 digits
m = month, 2 digits (leading zero)
d = day, 2 digits (leading zero)
So, date('Ymd') return todays date in YYYYMMDD format, which is the format used in the function.