translate form into URL

Hi! I’m trying to transform this:

<form method=post action="servers/add-server.php"> Server ip (ip:port): <input name="serverip" /> <input type="submit" value="Add server" />
into a string to put in my browser, something like :

servers/add-server.php?serverip= server

Am I doing something wrong? Because it doesn’t work.

In your form you have “method=post”, that should be “method=get” for it to be in the URL. GET and POST are two different ways to handle form processing.

Thanks for the reply!
I don’t have access to the code, so i can’t edit it.
So if it were GET, it would have worked?

Yes, a form with a method of GET will put the variables in to the URL like you are wanting. The variables are still being transferred to the page, just not visibly.

Sponsor our Newsletter | Privacy Policy | Terms of Service