Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

177
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!