php - Need drop-downs option value in form action query-string -


I am working in PHP + HTML

I have defined the way I have such a task Given this:

1] form action = "index.php? Option = com_advertisment and task = key search and medored = 2 & catid = this.options [this selected index] .value" / P>

but

means this.options [this.selectedIndex] .value is not replaced by value but like That this is in a query string like this:

http://mydemoserver.com/index.php?option=com_advertismen T & amp; task = keysearch & itemid = 2 & amp;

It seems that you are trying to mix your HTML and JS incorrectly.

If you have your & lt; Form & gt; tag has placed all of its fields inside the tag.

If y are the first three query-parameter combinations to be static, you can hide them from & lt; Input & gt; inside the tag. For example:

  & lt; Form action = "index.php" method = "received" & gt; & Lt; Input type = "hidden" name = "option" value = "com_advertisment" /> & Lt; Input type = "hidden" name = "task" value = "main search" /> & Lt; Input type = "hidden" name = "item" value = "2" /> & Lt; Select name = "catid" & gt; & Lt; Option value = "1" & gt; Some options & lt; / Option & gt; & Lt; Option value = "2" & gt; Another option is & lt; / Options & gt; & Lt; / Select & gt; & Lt; Input type = "submit" / & gt; & Lt; / Form & gt;    

Comments