Mykei Posted August 5, 2008 Share Posted August 5, 2008 So I don't know any PHP but would really like a quick answer to what I'm trying to do So my link is as follows : /ach.php?map=MAPNAMEHERE&pid=YOURPID I would like to create two text boxes, one for 'MAPNAMEHERE' and one for 'YOURPID' So once the user has filled in his or hers 'MAPNAME' and 'PID' in the text boxes and submits it, It will then replace the 'MAPNAMEHERE' and 'PID' with the map name and PID they typed in. Would really appreciate a answer, thanks. : Also sorry If It has been asked before but I'm not sure what terms to search for it. Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 5, 2008 Share Posted August 5, 2008 You want them in the URL? Just use GET on the form with properly named inputs. Quote Link to comment Share on other sites More sharing options...
Mykei Posted August 5, 2008 Author Share Posted August 5, 2008 Yeah I'd like it to change the URL Could you maybe give me a quick example please? Quote Link to comment Share on other sites More sharing options...
lemmin Posted August 5, 2008 Share Posted August 5, 2008 This should do it: <form action="ach.php"> Map: <input type="text" name="map"> ID: <input type="text" name="pid"> <input type="submit"> </form> Quote Link to comment Share on other sites More sharing options...
Mykei Posted August 5, 2008 Author Share Posted August 5, 2008 Thank you so much lemmin and DarkWater, It now works perfectly and I understand what the code snippit is doing, It's all so simple now Quote Link to comment Share on other sites More sharing options...
DarkWater Posted August 5, 2008 Share Posted August 5, 2008 Also, so it's valid, you may just want to change the form tag to: <form action="ach.php" method="get"> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.