View Full Version : Converting a link into a form input

12-09-2011, 12:55 AM
So...my buddy who was the original creator of the game directory and game profile code on my 2 gaming sites (both sites use the same code...I just chose to abandon one and relaunch it with a new site) is now busy with other things and won't help me until January.

I told him about my coding problem....he suggested that I convert the <a href> code into a <form> input code. The form should turn the text link into a submit button (which I hope will look like text when modified in css) and the submit button will have the value of the game's name in the database and the button will input the gameId associated with the game's name.

The code I'm using now is this:

<a href=http://www.rpgmax.com/mmo/gamedirectory/gameprofile/?gameId=" . $row['gameId'] . ">" . $row['gameName'] . "</a>

And then I use a $gameId = $_GET['gameId']; GET code on the game profile page to fetch the gameId and attach it the the URL (I'm typing tat without actually copying and pasting the actual code).

Does anybody know hot to convert the above php a href code into form input form? The _GET code should then change to _POST to correspond to the form input code. Not sure though...