redgtsviper Posted May 24, 2006 Share Posted May 24, 2006 Is there a way I can have a single form field on a page and when I enter something into it and click submit, have the info added into my URL.Here is may sampe code. I am sure that I am going about this all wrong<html><head><title>Test</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body><form name="form1" method="post" action="../folder/$idNo"><input name="idNo" type="text" id="idNo"><input type="submit" name="Submit" value="Submit"></form></body></html> Link to comment https://forums.phpfreaks.com/topic/10384-need-help-this-might-be-a-stupid-question/ Share on other sites More sharing options...
GingerRobot Posted May 24, 2006 Share Posted May 24, 2006 So you want to submit the form and then have the values in the URL?You need to use the GET method....<form action="formpage.php" method="get"><input name = "idNo" type="text"><input type="submit" name="Submit" value="Submit">This would give a url of www.example.com/formpage.php?idNo=the value in the field. Link to comment https://forums.phpfreaks.com/topic/10384-need-help-this-might-be-a-stupid-question/#findComment-38698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.