Answer the question
In order to leave comments, you need to log in
How to display forms for submitting data to the database on one page after changing the data base locations?
Greetings! Please tell me how to link forms (for sending numbers to database fields). If, I changed the field locations. For example, the data was taken from the pays table (where all data was entered into a new column and id 1 was for everyone in a row), and now the columns are tied to the sites table and mapped to id, respectively. Clarification: the form data (for input) must be on the same page.
<h5>СТАТИСТИКА по ПЕРЕПРАВЕ</h5>
<form action="" role="form" method="POST" style="float: left;">Вложено: <input name="up_1" type="text" size="8" maxlength="8" class="summ" value=""></form>
<form action="" role="form" method="POST" style=" float: left; padding-left: 20;">Выведено: <input name="down_1" type="text" size="8" maxlength="8" class="summ" value=""></form>
<br>
<br>
<br>
<h5>СТАТИСТИКА по INDASTRIES</h5>
<form action="" role="form" method="POST" style="float: left;">Вложено: <input name="up_2" type="text" size="8" maxlength="8" class="summ" value=""></form>
<form action="" role="form" method="POST" style=" float: left; padding-left: 20;">Выведено: <input name="down_2" type="text" size="8" maxlength="8" class="summ" value=""></form>
$up_1 = protect($_POST['up_1']);
$up_2 = protect($_POST['up_2']);
$down_1 = protect($_POST['down_1']);
$down_2 = protect($_POST['down_2']);
# приплюсовываются значения
$db = mysql_query("UPDATE pays SET up_1=up_1+'$up_1', up_2=up_2+'$up_2', up_3=up_3+'$up_3', up_4=up_4+'$up_4', down_1=down_1+'$down_1', down_2=down_2+'$down_2', down_3=down_3+'$down_3', down_4=down_4+'$down_4' WHERE id = '1'");
$db = mysql_query("UPDATE sites SET up=up+'$up', down=down+'$down', WHERE id = '$id'");
Answer the question
In order to leave comments, you need to log in
That is, all values are not in a line, but in two columnsPlease learn to express your thoughts. In "two columns" and "in line" is the same thing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question