在PHP中获取INFO [关闭]

So, I made a thing where it gets the connection of a game server when you put it in a search box and press submit. Now, what I want it to do is to get the information when I type something like http://link.com/search.php?serverName=hello.com

and that hello.com would be the thing that it gets the information for.

You should consider looking into something called GET which can be added to your HTML form, which essentially adds the content entered into the 'searchbox' onto the URL at the top.

You can try it out using something like this..

<form action="search.php" method="GET">
<!-- Your form components here -->
<input type="submit" value="serverName">

See above that the value of the submit button needs to be set to what you want to appear at the end of the URL, in this case it would display '?serverName'

Then in regards to processing this data, you will need to look up searching algorithms in PHP, the best method is a FULL-TEXT search, but can be quite complicated to do, there are others that will get the job done.

http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html

Some more useful links:

http://www.w3schools.com/html/html_forms.asp

http://www.tutorialspoint.com/php/php_get_post.htm