-1

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...

Votes + 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?
2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by bavenbabu
0

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']; } ?>">
0

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

0

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.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.