D
D
Develm2015-11-25 11:08:44
PHP
Develm, 2015-11-25 11:08:44

How to replace name when processing $_POST?

There is a code:

foreach($_POST as $key => $array){
switch($key)
    {
    
    
      case "custom_name_checkbox_".$i."":
        $key = 'Товар:';
      break;
      case "custom_name_text_".$i."":
        $key = 'Количество:';


   	}
    }

you need how to replace name($key), that's about it, but it only works once, and then it's kind of crooked.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita, 2015-11-25
@Develm

it is necessary to replace not at processing of a variable, and before sending. In the form, change the name attribute of the control and that's it

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question