Get ready for BLACK FRIDAY shopping starting in

Forums

PHP

This topic is locked

Incremental Dates for each record

Posted 26 May 2009 16:25:24
1
has voted
26 May 2009 16:25:24 john henderson posted:
Hi All,

I am afraid that I am not a php programmer, just a dreamweaver user with a DataAssist server behaviour. [:I]

I have created a page which allows users to set up a pre-selected number of pre-payments i.e 1-12, as well as frequency i.e 7, 14, 28 etc as well as a selected date i.e. this can be any date in the future.

This means that I need to enter the first date that they select into the first record then increment each date for the following number of records/pre-payments and the date should increment by the frequency.

I have used dataassist to create the multiple inserts but am stuck on how I should proceed.

So far, I have a hidden date field which I have added the following code...

<input name="hf_date_<?php echo $RepeatSelectionCounter_1; ?>" type="hidden" id="hf_date_<?php echo $RepeatSelectionCounter_1; ?>" value="<?php $date = $row_Recordsetcustomers['date'];
$frequency = $row_Recordsetcustomers['frequency'];
$newdate = strtotime ( '+ 7 day' , strtotime ( $date) ) ;
$newdate = date ( 'Y-m-d H:i:s' , $newdate); echo $newdate; ?>[
" />

The repeat selection counter is part of the dataassist server behaviour, so has to remain within the page. The section in bold is the code that I have added.

It appears to add the advanced date, not the user selected date; and then adds it to all the pre-payments/records. [!]

Hopefully some one can guide me as to where I am going wrong!

Thanks in advance


John Henderson

Replies

Replied 25 Jun 2009 16:05:52
25 Jun 2009 16:05:52 Patrick Julicher replied:
Hi John,

Did you contact DataAssist with this question?

Kind regards, Patrick
Replied 15 Sep 2009 18:33:17
15 Sep 2009 18:33:17 john henderson replied:
Sorry for such a late reply, but I did contact DataAssist and they helped me as much as they could. In the end, after endless searches I found the answer myself through examples and trial and error.

Thanks for asking
Replied 16 Sep 2009 17:34:11
16 Sep 2009 17:34:11 Patrick Julicher replied:
Hi John,

Thanks for your feedback.

Kind regards, Patrick

Reply to this topic