Jump to content

Archived

This topic is now archived and is closed to further replies.

techiefreak05

Setting the value of a textbox with a url???

Recommended Posts

I have some forms on my site and i was wondering if its possible to have the value of a textbox set with a url, ex.:

http://mydomain.com/page1.php?textbox=example&textbox2=example2

I know that doesnt work ... but to explain the example:  "textbox" is the name of the textbox, and "example" is the value and so on and so forth. .. is something like this possible??

Share this post


Link to post
Share on other sites
yep

if that is your url just do this.

<input type="text" name="textbox" value="<?php echo $_GET['textbox']; ?>">
<input type="text" name="textbox2" value="<?php echo $_GET['textbox2']; ?>">

Share this post


Link to post
Share on other sites
And u can post back to the browser using GET method, not POSt
<form method='get' action='".$_SERVER['PHP_SELF']."'>

Share this post


Link to post
Share on other sites

×

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.