Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3453112
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:20:13+00:00 2026-05-18T09:20:13+00:00

This may be very obiouvs and simple, but I haven’t used it, how can

  • 0

This may be very obiouvs and simple, but I haven’t used it, how can I get a from PHP a dynamic number of input fileds of the same type?

I have a situation where I’d like do make a dynamic number of inputs to send to the PHP page like this:

With jQuery I can add these inputs to increase or decrease the number of characters:

<!-- value is the character id -->
<tr><td><input type="checkbox" name="character" value="1256"></td></tr>
<tr><td><input type="checkbox" name="character" value="85"></td></tr>
<tr><td><input type="checkbox" name="character" value="901"></td></tr>
<tr><td>etc...</td></tr>

And I have a input submit at the end of the table to send data to my php page, how can I do to get all these characters? Should I do something directly with AJAX or can I handle it via $_POST variables?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T09:20:14+00:00Added an answer on May 18, 2026 at 9:20 am

    Include empty array accessors in the name of your field:

    <input type="checkbox" name="character[]" value="1">
    <input type="checkbox" name="character[]" value="2">
    

    Then access the post parameter as an array in php like:

    foreach($_POST["character"] as $char) { … }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This may be a very dumb question but I can't seem to get it
this may be a very basic question but I haven't used Linq much so
This may be a very simple question, but I haven't found an answer to
This may be very simple question,But please help me. i wanted to know what
this may be a very simple question, but is it possible to force a
This may be a very simple problem, but I couldn't find an answer googleing
This may be very basic, but I just can`t figure out what to do,
This may sound very stupid question , but I can't find any documentation that
This may be a very simple question, but at the moment I don't actually
This may be very simple but I have not been able to come up

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.