Textfield empty after submitting the form
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...
bavenbabu
Junior Poster in Training
60 posts since Feb 2012
Reputation Points: 4
Solved Threads: 1
Skill Endorsements: 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']; } ?>">
simplypixie
Practically a Master Poster
642 posts since Oct 2010
Reputation Points: 157
Solved Threads: 118
Skill Endorsements: 5
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
bavenbabu
Junior Poster in Training
60 posts since Feb 2012
Reputation Points: 4
Solved Threads: 1
Skill Endorsements: 0
Question Answered as of 1 Year Ago by
simplypixie 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';
}
?>
bavenbabu
Junior Poster in Training
60 posts since Feb 2012
Reputation Points: 4
Solved Threads: 1
Skill Endorsements: 0