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 7702075
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:08:36+00:00 2026-05-31T23:08:36+00:00

basically i have a database, which contains a random amount of questions i have

  • 0

basically i have a database, which contains a random amount of questions
i have then printed this out as a php table using a query. there is as many textboxes to input marks as there are questions in the database.
I want to create an array of my inputted data and then update the database with the marks in.

Here is my code

                    echo "<table border = '0' cellpadding ='10px'>";
            echo "<tr>
                <td> Question <td>Mark</td><td>Criteria</td>
                <td>Feedback</td>
                </tr>";

            while ($row = mysql_fetch_array($result))
            {   
                $question[]=$rows['question']; 
                echo "<tr>";
                echo "<td>". $row['question']. "</td>";
                echo "<td>" ."<input type = 'text' name = 'mark[]' size = '1' value = '0' id = 'mark'/>/". $row['maxMark'] . "</td>";
                $maxMark[] = $row['maxMark'];
                echo "<td>".$row['criteria']."</td>";
                echo "<td>" . "<textarea name = 'feedback[]' id= 'feedback'>Enter Feedback here</textarea>". "</td>";
                echo "</tr>";

            }

echo "</table>";
echo "</tr>\n";
echo "</table>";

I am not sure how to create the array, with the marks you input. please help.
In short i want to populate an array with the marks i input

  • 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-31T23:08:37+00:00Added an answer on May 31, 2026 at 11:08 pm

    This is rather easy to be done. All you have to do is setting the attribute name of your input controls and add an index.

    Example:

    <input type="text" name="name[0]" /><input type="text" name="mark[0]" />
    <input type="text" name="name[1]" /><input type="text" name="mark[1]" />
    

    The post (or get) data your script receives will then contain an array instead of a single variable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database of user answers from a quiz which contains 8 questions.
I have a database which contains a lot of geospatial data ... basically information
Basically I have a database with two tables, that is, Updates table and Images
We have a registration system Database and basically what this query does is check
I basically have three tables, posts, images and postimages (this simply contains the ids
I have a MySQL database called People which contains the following schema <id,name,foodchoice1,foodchoice2> .
I've spent the last 2 days trying to figure this out, basically I have
I have a database with a table that contains Name and CompanyName . They
I have an array which contains a set of information from a database, but
So! Basically I have a database with a load of blog posts, these are

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.