I would recommend:
<input type="text" name="fieldname" value="<?php
if (isset($_POST['fieldname']))
echo htmlspecialchars($_POST['fieldname']);
?>" />
or
<input type="text" name="fieldname"<?php
if (isset($_POST['fieldname']) && $_POST['fieldname'] != NULL)
echo htmlspecialchars($_POST['fieldname']);
?> />
Instead of comparing with NULL one could also check that strlen() returns a value greater than 0.
If magic quotes are on for POST operations, you should use:
echo htmlspecialchars(stripslashes($_POST['fieldname']));
Note that you wont need a name for the form (in the form tag), and that if you are using the same page to process the form, you can set the action to $_SERVER['PHP_SELF']
The method should of course be post.
Also, you might want to note that setting the action to "www.somesite.com/page.php" as given by OhLordly probably wouldnt work, you should either set using the absolute path with "http://" included, or using a relative path like with "./page.php"