1/2016
2/2016
niestety nigdzie nie mogę znaleźć jak to zrobić gdyż wszędzie są podane tylko liczniki zwykłe bądź odwiedzin stron.
kod u mnie wygląda tak:
Kod
<table border='1'>
<tr>
<th>LP</th>
<th>DataWpływu</th>
<th>Nadawca</th>
<th>NrWłasny</th>
<th>DataPisma</th>
<th>IlośćZałączników</th>
<th>Skierowano</th>
<th>Wydział</th>
<th>Uwagi</th>
</tr>
<?php
foreach($dane as $s):
?>
<tr>
<td><input type='text' name="[counter]" value=("1/<?=date $s('Y')?>)</td>
<td><?= date('Y-m-d', strtotime($s['inc_date']))?></td>
<td><?=$s['sender']?></td>
<td><?=$s['own_nr']?></td>
<td><?=$s['letter_date']?></td>
<td><?=$s['attachment']?></td>
<td><?=$s['submitted']?></td>
<td><?=$s['departaments']?></td>
<td><?=$s['descript']?></td>
</tr>
<?php
endforeach;
?>
</table>
<br>
<tr>
<th>LP</th>
<th>DataWpływu</th>
<th>Nadawca</th>
<th>NrWłasny</th>
<th>DataPisma</th>
<th>IlośćZałączników</th>
<th>Skierowano</th>
<th>Wydział</th>
<th>Uwagi</th>
</tr>
<?php
foreach($dane as $s):
?>
<tr>
<td><input type='text' name="[counter]" value=("1/<?=date $s('Y')?>)</td>
<td><?= date('Y-m-d', strtotime($s['inc_date']))?></td>
<td><?=$s['sender']?></td>
<td><?=$s['own_nr']?></td>
<td><?=$s['letter_date']?></td>
<td><?=$s['attachment']?></td>
<td><?=$s['submitted']?></td>
<td><?=$s['departaments']?></td>
<td><?=$s['descript']?></td>
</tr>
<?php
endforeach;
?>
</table>
<br>
a dokładnie chodzi o tą linię, gdyż tutaj coś jest nie tak:
Kod
<td><input type='text' name="[counter]" value=("1/<?=date $s('Y')?>)</td>
dodatkowo zastanawiam się czy w zapytaniu powinienem dla tego przypadku zdefiniować pole licznika i dodać licznik do inserta?
tak wygląda kod zapytania:
Kod
$sender = $_REQUEST['sender'];
$own_nr = $_REQUEST['own_nr'];
$letter_date = $_REQUEST['letter_date'];
$attachment = $_REQUEST['attachment'];
$submitted = $_REQUEST['submitted'];
$descript = $_REQUEST['descript'];
$query = "INSERT INTO officebk (counter, sender, own_nr, letter_date, attachment, submitted, descript) VALUES('$counter', '$sender', '$own_nr', '$letter_date', '$attachment', '$submitted', '$descript')";
$own_nr = $_REQUEST['own_nr'];
$letter_date = $_REQUEST['letter_date'];
$attachment = $_REQUEST['attachment'];
$submitted = $_REQUEST['submitted'];
$descript = $_REQUEST['descript'];
$query = "INSERT INTO officebk (counter, sender, own_nr, letter_date, attachment, submitted, descript) VALUES('$counter', '$sender', '$own_nr', '$letter_date', '$attachment', '$submitted', '$descript')";