Jump to content

Archived

This topic is now archived and is closed to further replies.

keram617

"add more parts" - how to create it in mysql and PHP

Recommended Posts

Hello

I am trying to find out how I could do the following.

I am building a form where data is being stored in MYSQL database (a PHP website) for every customer record, however the hard part in figuring this out for me is how could I add more parts if needed to the same record or at least a record that has the same customer_id.

For example, if a customer has a record created and they are purchasing more then one part from me I would like to have a field "add more parts" and this will allow me to select additional part but I want to make sure it is stored in a table as part of the same record (I dont care if it will create multiple records in the table or if it will be stored in second field).

Good example would be, if you log into any of your Webmails, and when you are creating a new email with an attachment, but you have more then one attachment, there is a link or a button that says "more attachments" and when you click on it, it creates new field for you.

 

Purpose of this is so I can then do a data scrap weekly and have it bounced against my inventory table and give me a count of left over part count.

 

Unless someone knows of some good PHP/MYSQL prebuilds for customer records creation and inventory control.

 

Thank you

Share this post


Link to post
Share on other sites

Don't know how exactly, but i think what you are referring to, is using array...

Store your $variable in an array,

INSERT INTO mysql table, and it will loop through the INSERT for as many variables there is in the array.

 

Hope this gives you an idea..

Share this post


Link to post
Share on other sites

Hello, keram617.

 

a)

Do you use a shop-software? Or is your "shop" hand-written? When you do not have the permission to change code in the software, you know. License-Thing!

 

b)

As you did describe that you want to "store stuff to a MySQL with PHP", perhaps you could perfectly start here: http://www.w3schools.com/php/php_mysql_intro.asp

 

Regards,

 

MPeter

Share this post


Link to post
Share on other sites

MPeter

Is there some good shop software for inventory control? that would work with MySQL and PHP of course.

Thank you

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.