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

  • Home
  • SEARCH
  • 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 8126973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T07:21:04+00:00 2026-06-06T07:21:04+00:00

Only editor can post into database but the price could’nt Post into database.. So,

  • 0

Only editor can post into database but the price could’nt Post into database..

So, how can i make query let say 1st Row in form has Field 1 = Fullname, Field 2 = Age.. and i can add new row again with the same field and submit all information to array into database

<?php
    session_start();
    include "_config/config.php";
    //include "header.php";


    if (isset($_POST["editor"])) //&& ($_POST["price"]) && is_array($_POST["price"]) && count($_POST["price"]) > 0) 
    { 
    foreach($_POST["editor"] as $editor)
       { 
           // echo htmlspecialchars($editor, ENT_QUOTES); 
           mysql_connect($server, $db_user, $db_pass)  or die ("Database CONNECT Error (line 62)"); 
           mysql_db_query($database, "INSERT INTO arrayins VALUES   ('','$editor','$price')");

       echo "Data Successfully Added";
            echo '<br />'; 
        } 
    }
    ?>
  • 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-06-06T07:21:05+00:00Added an answer on June 6, 2026 at 7:21 am

    You can first determine the number of rows posted, and then loop over the row index and get the appropriate values:

    $num_rows = is_array($_POST["editor"]) ? count($_POST["editor"]) : 0;
    
    for ($i = 0; $i < $num_rows; $i++) {
        $editor = $_POST["editor"][$i];
        $price = $_POST["price"][$i];
    
        // your SQL code here using $editor and $price
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

GWT's Editor framework is really handy and it can not only be used for
I want to create a text editor where I can make text bold, change
I need advice. I need to make something like a rich text editor but
Are there any editors that can edit multi-gigabyte text files, perhaps by only loading
I am trying to create a simple Javascript text editor that only makes paragraph
If you open Notepad, add ten lines and resize the editor to only show
I am working on an in-place HTML editor, concentrating on Firefox only right now.
Only one instance of a ScriptManager can be added to the page. this error
Only one instance of a Script Manager can be added to the page. Such
I'm making a text editor using Text Area. Which user can change font size,

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.