Jump to content

Need Help... This might be a stupid question


redgtsviper

Recommended Posts

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.