Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] No variables using post

Started by Binomine Jan 21, 2005 at 9:27 AM 3 replies 700+ views
Original Post
Binomine
Binomine
A bit n00bish, but it belong here, I guess I'm using php4 and forms.
<form method="Post" action="this webpage">
<input button>
<input button>
<input submit></form>
I never get the ?variable= to appear as part of the web address, which would be nice for bookmarking different pages. Any clue what I'm doing wrong?
evolutional
evolutional
If you're using a form with POST, the data won't be sent with the querystring. To get the behaviour you're looking for set the form method to GET.

<form method="GET" action="this webpage">  <input name="test" value="abc" />  <input name="test2" value="12345" />  <input type="submit"></form>


Edit: Your form was also a little odd.
Binomine
Binomine
Thank you, I always thought it was the reverse. [sweat]

It works fine now, although I have to change the order I query the database to get the result I'd like.

PS: the form was pseudocode.
evolutional
evolutional
Quote:
Original post by Binomine
PS: the form was pseudocode.


Cool - I thought it might have been!


How do you mean you have to change the way you query the database?
Binomine
Binomine
Quote:
Original post by evolutional
How do you mean you have to change the way you query the database?
My web application displays a random result within a user selected range.

I'm passing the range the user wanted into the page and then displaying the random result. What I should be doing, is passing the unque identifier, so the unique identifier can appear within the hyperlink allowing anyone to bookmark a result to share with friends AND / OR report said link to a moderator.

I've been thinking that a &#106avascript solution might be a better way of doing this, though.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.