What can i add above or below this to replace a blank form entry to the word "anonymous" without making the code explode. or do you need more code I know i can do it with an if statement but i just cant figure out how thanks </p> <form method="post" action="hminsbest.php"> <input type="hidden" name="wordid" value="<?=$_SESSION['gcid']; ?>" /> <input type="hidden" name="besttime" value="<?=$tempo; ?>" /> <input type="hidden" name="besttent" value="<?=$tentativi; ?>" /> <p><?=INSRT; ?><input type="text" name="newbest" size="20" maxlength="20" /> <input type="submit" value="<?=SBMT; ?>" name="go" /></p> </form> HTML:
if(strlen($var) === 0) { $var = "anon"; } something like that or if($var == '') { $var = "anon"; } either way should be fine.