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!