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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:21:45+00:00 2026-05-15T08:21:45+00:00

Hope my question is correct to the post. <form action=process.php?id=<?php echo intval($order[‘id’]);?> method=post> <ul>

  • 0

Hope my question is correct to the post.

  <form action="process.php?id=<?php echo intval($order['id']);?>" method="post">
  <ul>
  <?php
  $sd = 'SELECT * FROM download WHERE pid IN ('.$order['pid'].') ORDER BY pid ASC'; // pid IN (3,4,5)
  $qd = $db->rq($sd);
  $no = 1; while($download = $db->fetch($qd)) {
  ?>
  <li>
  <?php echo $no; ?> <?php echo $download['title']; ?>
  <input type="hidden" name="mid[]" value="<?php echo $order['mid']; ?>" />
  <input type="hidden" name="pid[]" value="<?php echo $download['pid']; ?>" />
  </li>
  <?php $no++; } ?>
  </ul>
  <input type="submit" name="submit" value="Submit" /> 
  </form>

Output

  1. Sony Ericsson Drivers
  2. Sony Ericsson Apps
  3. Samsung Drivers
  4. Motorola Drivers

Question

  1. How to store (save) the data Output to table structure at below on process.php
  2. Data will be save something like these.

    id | mid | pid | title
    -----------------------------------------
    1  |  1  |  3  |  Sony Erricson Drivers
    -----------------------------------------
    2  |  1  |  3  |  Sony Erricson Apps
    -----------------------------------------
    3  |  1  |  4  |  Samsung Drivers
    -----------------------------------------
    4  |  1  |  5  |  Motorola Drivers  
    -----------------------------------------
    

process.php

if (isset($_POST['submit']) && !empty($_POST['submit'])) {
// I'm blur how to get dynamic mid[] & pid[] here
}
  • 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-15T08:21:46+00:00Added an answer on May 15, 2026 at 8:21 am

    Create a third hidden field for titles eg:

     <input type="hidden" name="title[]" value="<?php echo $download['title']; ?>" />
     <input type="hidden" name="mid[]" value="<?php echo $order['mid']; ?>" />
     <input type="hidden" name="pid[]" value="<?php echo $download['pid']; ?>" />
    

    Now you can store it like this, suppose your page gets submitted to process.php, this is what you should put in there:

    if (isset($_POST['submit']))
    {
      for($i = 0; $i<=count($_POST['title']); $i++)
      {
         $title = mysql_real_escape_string($_POST['title'][$i]);
         $mid = intval($_POST['mid'][$i]);
         $pid = intval($_POST['pid'][$i]);
    
         // database code
         $query = "insert into table set title = '$title', mid = $mid, pid = $pid";
         // mysql_query and/or more code....
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple question I hope.... I have a Win Form with a Tab Control and
I hope the question is clear enough. Here's my query: SELECT 'Total Complete' AS
Hope this question is not stupid since I am an amateur web designer. I
I hope this question isn't too general. Well, the situation is that I am
I hope this question isn't too dumb. We have many websites internally that need
I hope this question is not 'controversial' - I'm just basically asking - has
I hope this question is not a duplicate but I didn't find anything equivalent
I hope this question isn't too open ended, but a nudge in the right
I hope this question will not be rejected as there is no code. But
Background: I hope my question is not too vague. I will try and explain

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.