edit.php

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php
mysql_connect('localhost', 'root', '');
mysql_select_db('Track');
mysql_query ("set character_set_client='cp1251'");
mysql_query ("set character_set_results='cp1251'");
mysql_query ("set collation_connection='cp1251_general_ci'");
$sql = 'UPDATE Tracktors SET name="'.$_POST['name'].'", corp="'.$_POST['corp'].'", country="'.$_POST['country'].'", year="'.$_POST['year'].'", dealer="'.$_POST['dealer'].'", ch="'.$_POST['ch'].'" WHERE id='.$_POST['id_edit'];
mysql_query($sql);
echo '<form action="in.php" method="post">';
echo '<input name="goToInput" type="submit" value=" &nbsp;&nbsp;Вернуться к полям ввода.&nbsp;&nbsp;">';
echo '</form>';
echo '<form action="show.php" method="post">';
echo '<input name="goToEdit" type="submit" value="Вернуться к редактированию.">';
echo '</form>';
?>