mercredi 31 juillet 2019

Problem with form option selected where parameters in the url

Hi I have problem with my multiple select search form.

The parameters are in the url urlhomepage.../search?cars=1&cars=2&cars=4

I do not know how to get parameters url in form option as selected

<select multiple="multiple" name="cars[]" id="select2" placeholder="">
  @foreach($names as $name)
  <option value=""></option>
  @endforeach
</select>

I want to get the effect so that the form options are marked on the basis of a url query



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire