Jump to content

dima19

Neophyte
  • Posts

    1
  • Joined

  • Last visited

Everything posted by dima19

  1. разрешите в клиниться нужна помощь уже голову сломал мне нужно что б при нажатии по ссылке СОХРАНИТЬ выполнялся UPDATE а значения inputa не могу выдернуть <form method="GET" > <? $page_title=$_GET['page_title']; $izm=$_GET['izm']; $del=$_GET['del']; $save=$_GET['save']; echo'</form>'; include ('config.php'); ?> <form action="person.php" name="form1" method="POST" > <? if ($save<>0) { $sql=mysql_query('UPDATE person SET PERSON="'.$_POST['izm_person'].'" WHERE ID="'.$save.'"'); } if ($del<>0) { $sql=mysql_query('DELETE FROM person WHERE ID="'.$del.'"'); } $person=mysql_query('select * from person where nlc="'.$page_title.'"'); $table= "<table border=1>"; $table.= "<td align=center bgcolor=Indianred>Год</td>"; $table.= "<td align=center bgcolor=Indianred>Месяц</td>"; $table.= "<td align=center bgcolor=Indianred>Зарегистрировано</td>"; while($record=mysql_fetch_assoc($person)) { $table.= "<tr>"; $table.= "<td align=right>".$record['SYS_YEAR']."</td>"; $table.= "<td align=right>".$record['MES']."</td>"; if ($record['ID']==$izm) { $table.= '<td><input name="izm_person" type="text" align="right" value="'.$record['PERSON'].'" size="6"></td>'; $table.= '<td><a href="person.php?page_title='.$page_title.'&izm='.$record['ID'].'"><img src="images/b_edit.png" border=0 title="Изменить">Изменить</a></td>'; $table.= '<td><a href="person.php?page_title='.$page_title.'&save='.$record['ID'].'"onClick="document.forms['.form1.'].submit()"><img src="images/b_save.png" border=0 title="Сохранить">Сохранить</a></td>'; } ELSE { $table.= "<td align=right>".$record['PERSON']."</td>"; $table.= '<td><a href="person.php?page_title='.$page_title.'&izm='.$record['ID'].'"><img src="images/b_edit.png" border=0 title="Изменить">Изменить</a></td>'; $table.= '<td><a href="person.php?page_title='.$page_title.'&del='.$record['ID'].'"><img src="images/b_drop.png" border=0 title="Удалить">Удалить</a></td>'; } } $table.= "</tr>"; $table.= "</table>"; echo $table; ?> </form>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy