[SOLVED] form along with ids

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

[SOLVED] form along with ids

Post by dude81 »

Hello forum,
I have php page coming with page.php?id=2,
how do I pass such a thing in form action,
is it possible only thorugh href??
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Code: Select all

action="form.php?id=2"
:?

it's recommended to pass it via the form itself however using a hidden field

Code: Select all

<input type="hidden" name="id" value="2" />
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

yup it works fine but at the same time it gets values like

Code: Select all

?id=2&x=47&y=9
where x and y are not being passed
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

explain more please. Where are these supposed to be coming from, the form? You'd need to use the method get to have more data passed via the url.
User avatar
dude81
Forum Regular
Posts: 509
Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City

Post by dude81 »

SOLVED.I was using get method itself
Post Reply