Share » Forums » Developer » Problem with form varibles in temaplte

Problem with form varibles in temaplte

Problem with form varibles in temaplte

Thursday 06 September 2007 12:40:22 pm - 3 replies

Author Message

Atle Pedersen

Friday 07 September 2007 12:12:30 am

Hi,

I'm not sure, but it seems to me that your form and its names are correct, but that your logic is slightly flawed.

The first time you load a page with this code, the category variable will not be set. This leads to an incomplete action in your form. That means that the first time a user uses the send button, the category variable will be empty.

After the first press wanted_category is set, and using the send button from now on will also set the category variable.

If this is not the problem, that is you that the first time you enter the page the category variable already set, then try writing out some variables and specify exactly what it is that is not working.

Atle

Jose Mourinho

Friday 07 September 2007 5:18:06 am

Hi Atle Pedersen

The logic is that when first time user comes in the page no categoy should be set and user will see all hotels. If user set a cetegoy by the form the page must show only the hotels that belongs in this category.

This is the logic ...

Atle Pedersen

Friday 07 September 2007 11:35:11 am

Well, then you need only one variable. At the moment you're trying to use two, and this makes no sense.

My advice would be to only use the post variable wanted_category, remove (category) and do your fetch based on wanted_category.

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu