carefree Posted October 11, 2007 Share Posted October 11, 2007 Is it possible to use a link to fill in <input></input> Forms?? When clicked the "Basic_Free_Account" Should show up in the input box below. But this dosent work for me. Heres my link: http://www.mysite.com/partnerform.php?name=Basic_Free_Account Heres my form input: <input name="name" maxlength="500" style="width:150px; float:left" size="500" /> All pages are in php Anyone have any ideas?? Link to comment https://forums.phpfreaks.com/topic/72752-how-to-use-a-link-to-fill-in-forms/ Share on other sites More sharing options...
benji87 Posted October 11, 2007 Share Posted October 11, 2007 You need to register the variable parsed in the URL $name = $_GET['name'] then echo it in the relevant field <? echo "$name" Hope this helps. Link to comment https://forums.phpfreaks.com/topic/72752-how-to-use-a-link-to-fill-in-forms/#findComment-366890 Share on other sites More sharing options...
carefree Posted October 11, 2007 Author Share Posted October 11, 2007 $name = $_GET['name'] Sorry im not using a database. Link to comment https://forums.phpfreaks.com/topic/72752-how-to-use-a-link-to-fill-in-forms/#findComment-366895 Share on other sites More sharing options...
thedarkwinter Posted October 11, 2007 Share Posted October 11, 2007 hehe ??? $_GET is the url parameters, not a database: so when your link goes to http://www.blah.com/page.php?name=myname $_GET["name"] would = myname in your case <?php //..... code code code echo "<input name=\"name\" maxlength=\"500\" style=\"width:150px; float:left\" size=\"500\" value='{$_GET["name"]}' /> ... should do the trick Link to comment https://forums.phpfreaks.com/topic/72752-how-to-use-a-link-to-fill-in-forms/#findComment-367111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.