Page 1 of 2

start date insertion for pHP

Posted: Sun Jul 01, 2007 5:53 pm
by listguy
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">

Posted: Sun Jul 01, 2007 6:00 pm
by superdezign
Where are you storing this data? What do those Insert*() functions do?

Posted: Sun Jul 01, 2007 6:02 pm
by listguy
data is stored on a secure server

Posted: Sun Jul 01, 2007 6:07 pm
by listguy
This is a form for a subscription form.

Just wanted to see if the "date" could be updated in the code.

Posted: Sun Jul 01, 2007 6:17 pm
by superdezign

Posted: Sun Jul 01, 2007 6:22 pm
by listguy
not sure how to change or modify this string to make that date change.

<?php InsertSubscriptionSignature("20.00", "20070207", "monthly", "12", "true") ?>

I saw the link you sent but still unsure how to do it.

I'm very newbie to the core.

Posted: Sun Jul 01, 2007 6:29 pm
by superdezign
Which is why I asked you where the data is stored and what those functions do. If we don't know what they do or how they work, we can't really help you.

"Stored on a secure server" means nothing.

Posted: Sun Jul 01, 2007 6:30 pm
by listguy
I guess what I'm asking is this

Is it possible to force an update date change, in this string of code.

<?php InsertSubscriptionSignature("20.00", "20070207", "monthly", "12", "true") ?>

Posted: Sun Jul 01, 2007 6:34 pm
by listguy
the data is stored at Cybersource.

The functions tell it :
how much the subscription costs
the date the order was placed
the length of time (months)
whether or not to renew after so many months (i.e. true,false)

Not sure if I'm communicating this properly

Posted: Sun Jul 01, 2007 6:42 pm
by superdezign
Do you have the inner workings of this function?

If the second parameter is indeed the date, look at the link I gave you to the date() function's documentation and make the date.

Posted: Sun Jul 01, 2007 6:46 pm
by listguy
Thats the problem.

I don't know how to do it.

Yes, the second parameter is the date.





I can compensate someone that can make it work. Reasonable Paypal compensation..

Posted: Sun Jul 01, 2007 7:00 pm
by superdezign
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')

Posted: Sun Jul 01, 2007 7:10 pm
by listguy
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.

Posted: Sun Jul 01, 2007 7:23 pm
by listguy
this is what it's calling for:

recurringSubscriptionInfo_startDate

Posted: Sun Jul 01, 2007 7:26 pm
by superdezign
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.