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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:31:10+00:00 2026-06-08T18:31:10+00:00

I have a form request_form.php, that is manage Purchase Request Form for request item.

  • 0

I have a form request_form.php, that is manage Purchase Request Form for request item.

Purchase_Request_No : (automatic – autoincrement)
Date :
Dept :
Supplier :
Item_Request :
Example have a 5 row :

1.
2.
3.
4.
5.

I want to make once Purchase Request have 1 Purchase_Request_No.
Example :

Purchase_Request_No : 17
Date :25-Jul-2012
Dept :Production
Supplier :Microsoft
Item_Request :
1.Windows XP Professional
2.Keyboard
3.Mouse
4.LCD Monitor
5.Speaker

So, how can I make it with 1 Purchase_Request_No with item request more than 1 item(in this case I put 5 items)?

Anyone can help me ?
Thanks for advance.


Hi all, back again now I already in coding the concept.
It’s successfully save the data into database, but still when insert 5 item, it submit the data per item per ID.
Example :
Item 1 – Computer (Purchase No 1)
Item 2 – Mouse (Purchase No 2)

That I wanted is :
Item 1 – Computer (Purchase No 1)
Item 2 – Mouse (Purchase No 1)

and here it’s my code :
I using purchase no with autoincrement.

<?php
$conn = oci_connect("system", "dev01");
$n = $_POST['jum'];
for ($i=1; $i<=$n; $i++)
{
$dept=$_POST['dept'];
$date_request=$_POST['date_request'];
$supplier=$_POST['supplier'];   

$item=$_POST['item'.$i];    
$qty=$_POST['qty'.$i];  
$uprice=$_POST['uprice'.$i];    
$total=$_POST['total'.$i];  

$s = oci_parse($conn,
"insert into purchase_request(dept_id, supplier_id, date_request, item, qty, uprice, total_amount) values ('$dept', '$supplier', '$date_request', '$item'
, '$qty', '$uprice', '$total'
)");

$r = oci_execute($s);

oci_rollback($conn);

echo "Data was committed\n";
}
?>

Any idea ?

  • 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-08T18:31:11+00:00Added an answer on June 8, 2026 at 6:31 pm

    Have three tables. One would contain the products:

    id    Product
    1     Windows XP Professional
    2     Keyboard
    3     Mouse
    4     LCD Monitor
    5     Speaker
    

    another contains the requests:

    id    request_date    dept       supplier
    1     25-Jul-2012     Production Microsoft
    

    The third maps the first two together

    id  request_id  item_id
    1   1           1
    2   1           2
    3   1           3
    4   1           4
    5   1           5
    

    (Alternately, you could make the ids of the products prime numbers and store the items column as a multiple of the items. All you’d need to do is find the prime factors of the items column, and then you’ve got the list of items!*)

    *For some reason, no one at work thinks this is a good idea.

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

Sidebar

Related Questions

In my application I have a drop-down form that fires up an AJAX request
So I have a form on PHP/HTML page. User submitss it to that same
I have page1.php that uses a form to send the following data: <form action=page2.php
I have a form which has action=process.php . Inside that php file there is
i have simple form that uploads image to server and returns php string containing
I have a static form on a server that does not support php: <form
I asked that before, but couldn't figure it out. I have this form: <?php
I currently have a form set up that passes some data to a php
Hi I have a php form that works perfectly when it sends an email
I have a php form with a jquery validator script that is only validated

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.