Hello everyone, such a question. There is a DB with 1 table and 5 columns, and there are 2 pages.
here is Index pp
<? $db_host = 'localhost'; $db_name = 'figures'; $db_username = 'root'; $connect_to_db = mysql_connect($db_host, $db_username, $db_password) or die("Не найдено соединение: ".mysql_error()); mysql_select_db($db_name, $connect_to_db) or die("Не найдена бд: ".mysql_error()); echo "<form method='post' action='obj.php'><select name='id'>"; for ($i = 1; $i <= 1000; $i++) { $sql = mysql_query("select * from `figures` where `id`='".$i. "' order by `about Obj`"); while ($s = mysql_fetch_array($sql)) { echo "<option value='".$s['id']. "'>".$s['about Obj']. "</option>"; } $sec = $s['id']; echo "<br>"; } echo "</select> <input type='submit' name='action' value='Выбрать'> </form>"; ?> here is the page receiving code
$connect_to_db = mysql_connect($db_host, $db_username, $db_password) or die("Не найдено соединение: " . mysql_error()); mysql_select_db($db_name, $connect_to_db) or die("Не найдена бд: " . mysql_error()); $sec1=$_POST['sec']; if(isset ($_POST['action'])){ $sql=mysql_query("select * from `figures` where `id`='".$sec1."'"); while ($data1 = mysql_fetch_array($sql)) { echo $data1['obj']; } } I need to transfer the selected id from the obj column to the selected id and write it to the variable, but something doesn't work, tell the experienced eye what is wrong and what to fix. Thank you in advance!

но что то не получается- what exactly? gives an error? Or records 1,000 lines at once or locks in the bathroom and spends hot water in vain? - Alexey Shimansky