MrSamCraft Posted June 25, 2013 Share Posted June 25, 2013 Hello! Iv made a little Minecraft avatar generator that can fetch Minecraft avatars. But for this to work I'm going to use a form that allows users to input a username and select a size. For example: But how could I get the username and avatar size into the URL, for example; (For this to show i added it in) http://pvpbattles.com/mc/index.php?u=MrSamCraft&s=90 Thanks, Sam D Link to comment https://forums.phpfreaks.com/topic/279554-how-to-get-form-info-into-url/ Share on other sites More sharing options...
ginerjm Posted June 25, 2013 Share Posted June 25, 2013 Assuming that you "generate" button is a submit, make sure your form uses "method='GET'" That will generate the url you seek, where your username input tag has a name of 'u' and your size tag a name of 's'. Link to comment https://forums.phpfreaks.com/topic/279554-how-to-get-form-info-into-url/#findComment-1437809 Share on other sites More sharing options...
shlumph Posted June 25, 2013 Share Posted June 25, 2013 I'm unclear on what you would like, but using GET as the form's method type would place all of it's form variables into the URL. <form action="index.php" method="get"> ... </form> Link to comment https://forums.phpfreaks.com/topic/279554-how-to-get-form-info-into-url/#findComment-1437810 Share on other sites More sharing options...
MrSamCraft Posted June 25, 2013 Author Share Posted June 25, 2013 Okay thanks guys Link to comment https://forums.phpfreaks.com/topic/279554-how-to-get-form-info-into-url/#findComment-1437812 Share on other sites More sharing options...
ginerjm Posted June 25, 2013 Share Posted June 25, 2013 HTH - don't forget to mark this as answered. Link to comment https://forums.phpfreaks.com/topic/279554-how-to-get-form-info-into-url/#findComment-1437821 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.