Stucked with form elements - HELP PLEASE !
Posted: Sun Oct 20, 2002 10:07 pm
Hi! I'm try to make a simple application, using MySQL and PHP.
To show u my idea, the image:

Let me explain u now what I wanna achieve w/this. This is suppoustly a request product page, where a customer choose what product ask to some company X by chosing him/her it using the combo box (or list/menu).
Now, I'm stucked 'cause I dont know if what I wanna do is possible or not.
Let me explain u this pretty clear so that u get the idea:
In the picture above I pointed (w/red arrows) the 3 fields in my form, w/their respective form element names (prod_name for the combo box and prod_price and prod_qty for the text fields). What I wanna do is once a product is chosen from the combo box the price of the product, appears inmediately in the text box "prod_price" (located at the right side of the product), of course the price would be taken from a MySQL Database as well as is been taken by the combo box to show the product name.
It is possible to use the variables of one form, before they have been submited????
basically, I'm stucked because I dont know if is possible to do that. I dont know how to show the price of the product at its right side inmediately since I dont know what product the customer chose. If I'd know that I could show it in the text field by usign a SQL query right ?
Thx in advance for any suggestion.
To show u my idea, the image:

Let me explain u now what I wanna achieve w/this. This is suppoustly a request product page, where a customer choose what product ask to some company X by chosing him/her it using the combo box (or list/menu).
Now, I'm stucked 'cause I dont know if what I wanna do is possible or not.
Let me explain u this pretty clear so that u get the idea:
In the picture above I pointed (w/red arrows) the 3 fields in my form, w/their respective form element names (prod_name for the combo box and prod_price and prod_qty for the text fields). What I wanna do is once a product is chosen from the combo box the price of the product, appears inmediately in the text box "prod_price" (located at the right side of the product), of course the price would be taken from a MySQL Database as well as is been taken by the combo box to show the product name.
It is possible to use the variables of one form, before they have been submited????
Thx in advance for any suggestion.