Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
Circumventing PHP's max_var_lim on POST method

I am a newbie in the PHP language and have been struggling with this particular problem.
I am trying to workaround the max_var_lim for retrieving data via POST in PHP. I am currently collecting data as follows, using a selectbox to retrieve data and putting them in an array to store in POST. Below is the code I have in my blade.php file:

<form action={{route('account.confirm')}} method="POST">
    <select class="select-cats" name = "categories[]" id="optcatlist" multiple="multiple">
        @foreach ($categories as $cat)
            <option value="{{$cat->id}}" @if($user->company->categories->contains($cat->id)) selected="selected" @endif>
                {{$cat->name}}
            </option>
        @endforeach
    </select>
</form>

The problem is, there are a ton of options (>1000) so in the case where all are selected, I am only able to retrieve the first 1000. I am unable to change the php.ini file, so that solution is a no-go.

My question is, how do I access $_POST["categories"] on this page and implode this into a single string so I can pass it on using POST without exceeding the max_var_limit?
A detailed answer would be much appreciated as I just started using PHP and don't know left to right. Thanks!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda