473,396 Members | 2,033 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

pass product descrip to php array

22
have a php shopping cart that uses a product array to build the order form.


Code: ( php )
$products=array(
array ("item01", "description", price),
array ("item02", "description", price),
array ("item03", "description", price),
);


we're trying to pass the itemnumber, description, and price to this script form a html page that has these fields defined in checkbox fields. the html page has over 1210 checkboxes and we want to pass the "checked" field data onsubmit.

any help would be greatly appreciated.

thank you.
Aug 27 '07 #1
1 1220
Good programming can't fix a bad design...

Here's a hint though:
you can add stuff to a php array like this:
[PHP]
$someArray=array();
for($i=0; $i<1210; $i++)
$someArray[]=array("item_".$i, "something", $somethingelse);

//or like this:
$someArray["betaphetamyne_price"]=1000;
$someArray[666]=$theBeast;
[/PHP]
Aug 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Fred | last post by:
Hi, i know how to pass a value from Javascript to ASP with a hidden field into a form and submitting it, or with cookies, but here i have to pass a lot of data in an array. There is a list of...
3
by: Paul T. Rong | last post by:
I have a listbox (of product names) control on my form. I want to pass the selected item (a product name) to a subform, and the product unitprice should apear automatically next to the product name...
7
by: ritchie | last post by:
Hi all, I am new to this group and I have question that you may be able to help me with. I am trying to learn C but am currently stuck on this. First of all, I have a function for each sort...
10
by: nospam | last post by:
Hello! I can pass a "pointer to a double" to a function that accepts double*, like this: int func(double* var) { *var=1.0; ... }
14
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is...
3
by: QQ | last post by:
I have one integer array int A; I need to pass this array into a function and evaluate this array in this function how should I pass? Is it fine? void test(int *a)
0
by: Jimstershat | last post by:
Hello Everyone, I need to do the following; I need to create the following url using a radio form: http://www.domain.com/addtocart.aspx?productid=18&variantid=37&quantity=1 I need to be able...
6
by: txguy | last post by:
thanks for your help. we have a html form with multiple checkboxes, over 1210, and we are running a javascript that tallies total number of boxes and prices for the checkboxes the user selects. ...
8
by: bharat64 | last post by:
How to Pass 2d Array in to function of c++ I have two 2d array of 3 X 3 named a and b in void main function Passing both to mult function and return back to main function with the product of a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.