Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

php variable

New Here ,
Oct 26, 2008 Oct 26, 2008
Hej,
I have a problem which I dont seem to able to solve by my one: I have one form for registration of client data, on which the client types a product-groupe (f.eks. hardware) and I would like to show a list of only hardware-products from a menu following the product-groupe input.

I can produce a recordset displaying the correct menu items, but I am not able to use the userinput (i.e. the correct variable) to filter the menu. (Either I get the hole list, or nothing at all).

who can help???
TOPICS
Server side applications
341
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Oct 26, 2008 Oct 26, 2008
gue@vagtelvej.dk wrote:
> Unfortunately I didnt get it to work... What I try to do is the following: I
> have my form which the user fills in and submitts. Before submitting I ask what
> kind of product groupe the user is interesset in, and in the next question what
> kind of product. The goal is to filter the possible menu-items in the 2.
> question by the response in the first question, but before submitting the form.

You cannot do that with PHP, because PHP is processed on the server. T...
Translate
LEGEND ,
Oct 26, 2008 Oct 26, 2008
gue@vagtelvej.dk wrote:
> I have a problem which I dont seem to able to solve by my one: I have one form
> for registration of client data, on which the client types a product-groupe
> (f.eks. hardware) and I would like to show a list of only hardware-products
> from a menu following the product-groupe input.

What you are trying to do is a basic search operation.

1. Set the form's method to GET.

2. In the Recordset dialog box (Simple mode), set Filter to the name of
the table column that you're searching for (product_group) and URL
Parameter.

When the form is submitted, your recordset will contain only those items
that belong to the selected product group.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2008 Oct 26, 2008
Thank you very much for the fast reply!!!

Unfortunately I didnt get it to work... What I try to do is the following: I have my form which the user fills in and submitts. Before submitting I ask what kind of product groupe the user is interesset in, and in the next question what kind of product. The goal is to filter the possible menu-items in the 2. question by the response in the first question, but before submitting the form. F.eks. the user chooses "hardware" from the menu in the first question, and this reduces the menu in the second fild to only hardware items.

I tried to change the method to "GET" and followed your advice - but without the correct result. I tried to boil the problem down to the following: When the user chooses "hardware" from the first menu, I tried to write "hardware" on the next line - a form of check - but that´s actually not working either... (i.e. same problem...)

Well- I hope that´s not too stupid a question - even for a newbe as me...

kind regards from DK
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 26, 2008 Oct 26, 2008
gue@vagtelvej.dk wrote:
> Unfortunately I didnt get it to work... What I try to do is the following: I
> have my form which the user fills in and submitts. Before submitting I ask what
> kind of product groupe the user is interesset in, and in the next question what
> kind of product. The goal is to filter the possible menu-items in the 2.
> question by the response in the first question, but before submitting the form.

You cannot do that with PHP, because PHP is processed on the server. The
form must be submitted for any change to take place.

To achieve the type of result that you want, you need to use Ajax to
send the request to the server without refreshing the page. To implement
an Ajax solution, you need a good knowledge of both PHP and JavaScript.
Using one of the JavaScript frameworks, such as Prototype or jQuery,
makes it easier, but you still need considerable coding skills.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2008 Oct 26, 2008
Thank you very much - that´s what i thought... I´ll find another solution

with kind regards

gü
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 26, 2008 Oct 26, 2008
LATEST
Thank you very much - that´s what i thought... I´ll find another solution

with kind regards

gü
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines