Forum Moderators: coopster
or help point me to the most basic tutorial.
Appreciation in advance ;-)
<input type="text" name="uname" value="<?php if (!isset($_POST['submit'])) {echo $_REQUEST['uname']; } else {echo '0';}?>" />
to get the input field to display a default value?
Obviously I can't coz... I'm getting a totally blank page... but am I on the right track?
=(
<?php
$uname = (isset($_POST['uname'])) ? $_POST['uname'] : 'default value';
?>
<form action="<?php echo strip_tags [php.net]($_SERVER['PHP_SELF']); ?>" method="post">
<input type="text" name="uname" value="<?php echo htmlentities [php.net]($uname); ?>" />
<input type="submit" value="post" />
</form>