Hello. I have a cycle for the withdrawal of applications:
for($i = 0; $i < $num_result; $i++){ $orders_catalog = pg_fetch_array($ord_result); $order_id = $orders_catalog['order_id']; $ord_name = $orders_catalog['feature_name']; $user_name = $orders_catalog['user_name']; $user_email = $orders_catalog['e_mail']; $user_phone = $orders_catalog['phone']; $subcategory_id = $orders_catalog['sub_name']; $datetime = $orders_catalog['datetime']; $message = $orders_catalog['message']; ?> <div class = "forsinglereq"> <div id = "servname"><span id = "inservname">НАИМЕНОВАНИЕ УСЛУГИ:</span><?php echo $ord_name;?></div><br> <span class = "prefix">Имя:</span> <div class = "inform"><?php echo $user_name;?></div><br> <span class = "prefix">Email:</span> <div class = "inform"><?php echo $user_email;?></div><br> <span class = "prefix">Телефон:</span> <div class = "inform"><?php echo $user_phone;?></div><br> <span class = "prefix">Подкатегория услуги:</span> <div class = "inform"><?php echo $subcategory_id;?></div><br> <span class = "prefix">Дата и время заявки:</span> <div class = "inform"><?php echo $datetime;?></div><br> <span id = "message">Сообщение:</span> <div id = "comment"><?php echo $message;?></div><br> <form action = "./rej_acc_funcs.php" method = "post"> <div id = "accept"><label id = "acceptoo" for = "on">Принять</label></div> <div id = "reject"><label id = "rejectoo" for = "out">Отклонить</label></div> <input id = "on" type = "submit" name = "acceptreq"> <input id = "out" type = "submit" name = "rejectreq"> <input type = "hidden" name = "orderid" value = "<?php echo $order_id;?>"> </form> </div> How to take from the loop exactly the array I need in order to reject or accept the application? While from the table the first record is selected. In the handler I transfer id. But I do not know how to pass a specific id. When it is possible to pass on the links using the GET method, there are no problems. But here I get the entire array from the sql table with the query. Help me please.
div class = "forsinglereq"- one application? And the problem is how to determine for which application the submit has worked? - Ponio pm