PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, February 17, 2022

[FIXED] Laravel how to insert multiple chekbox with different data

 February 17, 2022     laravel, laravel-5, mysql, php     No comments   

Issue

I want to upload different data with different values, and I am getting with dd() result like I want, but its only stored first values

If I checked 0, 3, 5, 10 I want to insert all data together

This is my controller

This is my view blade page

I want to insert in data just like this, but it only insert first array

Edited

I find solution of this problem, all data what I want to store needs to be in one array, so I use 4 for loops and put them in one array and then insert.


Solution

If multiple checkbox selected, then you can loop to see different selected values



Answered By - San K
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing