If you have a page called example.php and you want to send data to the script via the URL, use the following syntax:
Code:
example.php?variable1=foo&variable2=bar&answer=42
Then within example.php you can access the values via the $_GET superglobal:
PHP Code:
echo $_GET['variable1']; // foo
echo $_GET['variable2']; // bar
echo $_GET['answer']; // 42
So to pre-populate a text field:
PHP Code:
<input type="text" name="somefield" value="<?php echo $_GET['variable1'] ?>" />
Bear in mind that that you should always validate data before outputting it like this. It is less dangerous in a textbox, but if you are echoing user input directly you leave yourself open to a variety of attacks.
Bookmarks