473,698 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple selection + table

Hi guys,
I have a problem with multiple selection
I have a list with 8 options in pull-down menu. For each option I have a price.
Something like that :Element Price

Table 10
Sofa 20

<SELECT NAME=myfurnitur e[] id=myfurniture[] class=third multiple>
<OPTION VALUE="Table">T able </OPTION>
<OPTION VALUE="Sofa">So fa</OPTION>.....

I do that:

foreach ($myfurniture As $Item)
{
echo "<li>" . $Item . "</li>";
if($Item=True)
{
switch ($myfurniture)
{
case $myfurniture = "Table";

echo "<p class=second>Pr ice is: <span class=five> 10;</span></p>";
break;......
But I receive the result only and always for the last element from myfurniture array
Need help

I didnt find anything to treat something like
Thank You !!!
Jul 16 '05 #1
3 4506
Your switch it using incorrect syntax, the case should simply look like the
example below:

case "TABLE":

You do not need $myfurnaure ="Table";--this is wrong.

Also, take note that I used a colon after my case statement and not a
semi-colon.
"Lori Costache" <nc*******@hotm ail.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
Hi guys,
I have a problem with multiple selection
I have a list with 8 options in pull-down menu. For each option I have a price. Something like that :Element Price

Table 10
Sofa 20

<SELECT NAME=myfurnitur e[] id=myfurniture[] class=third multiple>
<OPTION VALUE="Table">T able </OPTION>
<OPTION VALUE="Sofa">So fa</OPTION>.....

I do that:

foreach ($myfurniture As $Item)
{
echo "<li>" . $Item . "</li>";
if($Item=True)
{
switch ($myfurniture)
{
case $myfurniture = "Table";

echo "<p class=second>Pr ice is: <span class=five> 10;</span></p>";
break;......
But I receive the result only and always for the last element from myfurniture array

Need help

I didnt find anything to treat something like
Thank You !!!

Jul 16 '05 #2
correct:

case "Table":

NOT

case "TABLE":

"Darryl Porter" <dp******@woh.r r.com> wrote in message
news:0U******** *************@t wister.neo.rr.c om...
Your switch it using incorrect syntax, the case should simply look like the example below:

case "TABLE":

You do not need $myfurnaure ="Table";--this is wrong.

Also, take note that I used a colon after my case statement and not a
semi-colon.
"Lori Costache" <nc*******@hotm ail.com> wrote in message
news:9c******** *************** ***@posting.goo gle.com...
Hi guys,
I have a problem with multiple selection
I have a list with 8 options in pull-down menu. For each option I have a

price.
Something like that :Element Price

Table 10
Sofa 20

<SELECT NAME=myfurnitur e[] id=myfurniture[] class=third multiple> <OPTION VALUE="Table">T able </OPTION>
<OPTION VALUE="Sofa">So fa</OPTION>.....

I do that:

foreach ($myfurniture As $Item)
{
echo "<li>" . $Item . "</li>";
if($Item=True)
{
switch ($myfurniture)
{
case $myfurniture = "Table";

echo "<p class=second>Pr ice is: <span class=five> 10;</span></p>";
break;......
But I receive the result only and always for the last element from

myfurniture array


Need help

I didnt find anything to treat something like
Thank You !!!


Jul 16 '05 #3
"Darryl Porter" <dp******@woh.r r.com> wrote in message news:<xV******* **************@ twister.neo.rr. com>...
correct:

case "Table":

NOT

case "TABLE":

"Darryl Porter" <dp******@woh.r r.com> wrote in message
news:0U******** *************@t wister.neo.rr.c om...
Your switch it using incorrect syntax, the case should simply look like

the
example below:

case "TABLE":

You do not need $myfurnaure ="Table";--this is wrong.

Also, take note that I used a colon after my case statement and not a
semi-colon.

Thank You Darryl


But STILL didnt work !!
Have you ever try something similar with my table? I modified maybe 20
times and 0, nada ! Im not specialist so please try to be pacient !
Jul 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
10929
by: news.hp.com | last post by:
I have situation where I need to copy multiple records (only certain fields) from a Rules table to an Events table based on a selection identified in a combo box. When the selection is made in a parent table, multiple records in a child table are affected. However, I'm a bit weak on programming experience. INSERT INTO is not suitable. Any ideas? When the combo box update property is triggered, the code needs to accomplish: IF...
3
5196
by: svdh2 | last post by:
I have been looking at a problem the entire week in access, I have still not been able to find a solution. Hope that you could maybe tell where to look Concerns the link between Access and Word. I can not transfer a report to word without losing out on the lay-out (RTF format). I understand that there is no way out ok, mail merge I thought. But here I have the problem that I need to merge multiple tables and that I can just include...
0
1154
by: dbuchanan | last post by:
How do I make multiple DataGridTableStyles serve the same table? (I can get multiple styles for the same datagrid, but not multple styles for the same *table* on the same datagrid) I want to do this because I want to have multiple views of the same table. I have a ComboBox where I select the view I want. There are ten views, but only three tables. I have no problem when I have a one for one relationship view=tablestyle as shown here;
3
3652
by: hmiller | last post by:
Hey everyone, I am having a hell of a time trying to set this menu system up. Here's what I'm trying to do. Combo Box One; is populated by names under properties "row source" "Phase 1" through "Phase 10" (there are 10 Phases I want to sort from) Once the phase has been selected a second combo box would populate.
1
3041
by: Shizbart | last post by:
MS Access 97 Beginner/Moderate Level User I am trying to create a Database to track Workouts in MS Access 97. I have one Table named Workouts that contains the following Fields: Workout Code (e.g: U100), WorkoutActivity (e.g.: Bench Press: Flat Bench Straightbar) (note: this is the Primary Key of this Table), and Target Area (e.g.: Upper Body / Chest). A second Table named Workout_Log contains the following Fields: Date,...
0
3475
by: acarrazco | last post by:
Hello, I am totaly new to VBA and I'm trying to modify a macro that was given to me but it doesn't seem to be working. I'm trying to extract data from three excel spreadsheets, put it into a combined one which creates a pivot table and sorts it into different fromats. Here is the code, can any body help? Sub Update_Land_Actuals() On Error Resume Next If InputBox("Enter password to continue", "Centex Homes") <> "***" Then Exit Sub...
92
4728
by: bonneylake | last post by:
Hey Everyone, Well i was hoping someone could explain the best way i could go about this. i have a few ideas on how i could go about this but i am just not sure if it would work. Right now i have a form where you can add and delete multiple serial information. This works wonderful. But now for every serial information i add i need to be able to add and remove multiple parts to that serial. heres an example of what i mean serial...
58
8086
by: bonneylake | last post by:
Hey Everyone, Well recently i been inserting multiple fields for a section in my form called "serial". Well now i am trying to insert multiple fields for the not only the serial section but also the parts section an i seem to be having trouble. When i try to insert into the parts section i get the error Invalid character value for cast specification. But not sure what i am doing wrong. Here is what i am using to insert. All the sections...
482
27694
by: bonneylake | last post by:
Hey Everyone, Well i am not sure if this is more of a coldfusion problem or a javscript problem. So if i asked my question in the wrong section let me know an all move it to the correct place. what i am trying to display previously entered multiple fields. I am able to get my serial fields to display correctly, but i can not display my parts fields correctly. Currently this is what it does serial information 1 parts 1
0
8674
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8603
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9157
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8895
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8861
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3046
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.