tags:

views:

22

answers:

1

OK

If im on: index.php?area=characters

and type in eg. Agamemnon Busmalis in the search field:

<h2>Search Character</h2>
<form action="?area=characters" method="get">
Name: <input type="text" name="name" />
</form>

I want it do send me to : index.php?area=characters&name=Agamemnon+Busmalis

but instead it sends me to: index.php?name=Agamemnon+Busmalis

why is this?

+2  A: 

Add a hidden form element:

 <h2>Search Character</h2>
 <form  method="get">
 Name: <input type="text" action="form.html" name="name" />
 <input type="hidden" name="area" value="characters" />
 </form>
np0x
Jimmy
Maybe you should check the syntax. Action is an attribute of form, not input
Eineki
Your comment is unclear. What didn't work? Are you concerned about the order of the get params? Did the name get truncated?
Cory House
They'll show up in whatever order you define them. Move the hidden field above visible one.
scribble
@scribble thx that fixed it!
Jimmy