Start New Discussion within our Web Development Community

i am a new to php.i am having a trouble that whenever i typed a wrong username in the textfield the field goes blank after its submission...I need the field values there such i need not want to insert the textfield value again.so how can i avoid such problem...i appreciate any help...

Comments
and you posted a PHP tech help question in a forum that has nothing to do with PHP and doesn't answer support questions why?

In the value of each form field you need to echo the posted data, for example

<input type="text" name="username" value="<?php if (isset($_POST['username'])) { echo $_POST['username']; } ?>">

i am a new to php.i am having a trouble that whenever i typed a wrong username in the textfield the field goes blank after its submission...I need the field values there such i need not want to insert the textfield value again.so how can i avoid such problem...i appreciate any help...

thanks for the help...it really helped me a lot...it solved ma problem

thanks for the help...it really helped me a lot...it solved ma problem

i got the answer
<?php
if(isset($_get))&&($_get==' ')
{
echo 'userfield is blank';
}
?>

This question has already been answered. Start a new discussion instead.