to jest główny + edycja
fajnie by było, gdyby edycja otwierała się w nowym oknie - tzn tylko edycja bez własnie tego glownego
i nie wiem jak to zrobić - super mi odpisałaś na poprzedniego posta, ale ten row musi się zmieniać więc gdzie powinnam umieścić java script aby mi się zmieniał? albo zrobić zczytywanie w...
<script type="text/javascript"> function wopen() {
window.open('editor_kcsa.php?edytuj=<?php print $row[0]; ?>','','');//width=400,height=200');
window.location.reload();
}
function newopen() {
window.open('../editor_csa/editor_kcsa.php?action=nowy','','');//width=1000,height=700');
window.location.reload();
}

<tr>
<td id="content">
<?=@$info?>
<form action=editor_kcsa.php method="get">
<input type="hidden" name="send" value="1" />
<fieldset>
<legend>KIEROWNICY CENTRUM SPRZEDAŻY AKTYWNEJ</legend>
<table cellspacing="5">
<tr>
<td align=center><p style="color: blue; "><b>KPX</b></p> </td>
<td align=center><p style="color: blue; "><b>KCSA</b></p></td>
<td align=center><p style="color: blue; "><b>Region</b></p></td>
<td align=center><p style="color: blue; "><b>Aktywny</b></p></td>
<td align=center><p style="color: blue; "><b> </b></p></td>
</tr>
<?
FROM tab_kcsa k
INNER JOIN tab_region r ON k.idreg = r.idreg; ");
for ($i=0; $i<$ilew; $i++) {
echo '<td align=center>'.$row[0].'</td>'; // echo '<td align=center>'.$row[4].'</td>'; // echo '<td align=center>'.$row[3].'</td>'; //
if ($row[9] == 1) { // jest aktywny
echo '<td align=center>'.'<input type="checkbox" value="true" checked="checked" disabled="disabled"/></td>'; } // jest aktywny
else {
echo '<td align=center>'.'<input type="checkbox" value="false" disabled="disabled"/></td>'; } // nie jest aktywny
echo '<td align=center>'."<a href ='editor_kcsa.php?edytuj=$row[0]'> Edycja </a>".'</td></tr>'; }
?>
</form>
<HR NOSHADE SIZE="1" color='orange'>
<table cellspacing=10>
<tr>
<td><b>Dodaj nowego KCSA</b></td>
<td><a href=editor_kcsa.php?action=nowy> Dodaj </a></td>
</tr>
</table>
<br>
<?
if (isset($_GET['edytuj'])) {
FROM tab_kcsa k
INNER JOIN tab_region r ON k.idreg = r.idreg; ");
for ($q=0; $q<$ilew; $q++) {
if ($row[0]==$_GET['edytuj']) {
<HR NOSHADE SIZE='1' color='orange'>
<br><table >
<tr>
<td><b>Edycja danych</b></td>
</tr>
</table><br>";
?>
<form action="editor_kcsa.php" method="get">
<br>
<table>
<tr>
<td><input type=hidden name=id value=<?=$row[0];?> ></td>
</tr>
<tr>
<td><p style="color: blue; "><b>Imię i nazwisko</b></p> </td>
<td><input type=text name=nazw value="
<?php echo $row[4
]; ?>" ></td>
</tr>
<tr>
<td><p style="color: blue; "><b>Region</b></p> </td>
<td class=select>
<select name=region>
<?php
$query = mysql_query("SELECT region FROM tab_region where region not like '$row[11]';"); echo "<option value=\"".$row["11"]."\">$row[11]</option>"; for ($i=0; $i<$ile; $i++){
echo "<option value=\"".$wiersz["region"]."\" >"; } // for
?>
</select>
</td>
</tr>
<tr>
<td><p style="color: blue; "><b>Aktywny</b></p> </td>
<?php
if ($row[9] == 1) { // jest aktywny
echo '<td>'.'<input type="checkbox" name = "aktywny" value="true" checked="checked" /></td>'; } // jest aktywny
else {
echo '<td>'.'<input type="checkbox" name = "aktywny" value="false" /></td>'; } // nie jest aktywny
?>
</tr>
<tr>
<td></td><td><input type=submit name=accept value='Zaakceptuj zmiany'></td>
</tr>
</table>
<br>
</form>
</fieldset>
</td>
<?php
} // if row
} // for ile edytuj
} // if isset edytuj