spec36 Posted December 28, 2011 Share Posted December 28, 2011 I am building a login script to help myself learn php. I currently have the script posting any registration form errors to the registration page. I am trying to make sure whatever the user has typed into the form will redisplay once they receive the error to prevent them from having to fill out the registration form again. I got it working, but there is an extra character "/" after what was entered by the user. Here is an example: Note: "1234" has been entered into username field on reg form. <tr><td>Username: </td><td><input size="20" type="text" name="username" <?php if ($_POST){ echo "value =" . $_POST['username'] ;}?> /></td></tr> I get this output 1234/ I do not know where the "/" is coming from. It should only be putting "1234" back into the username field. Any help would be great. Quote Link to comment https://forums.phpfreaks.com/topic/253917-solved-extra-character-being-added-to-output/ Share on other sites More sharing options...
spec36 Posted December 28, 2011 Author Share Posted December 28, 2011 I changed the line to this and it now works. <tr><td>Username: </td><td><input size="20" type="text" name="username" <?php if ($_POST){ echo "value =" . "\"" . $user . "\"" ;}?>/></td></tr> Thanks Quote Link to comment https://forums.phpfreaks.com/topic/253917-solved-extra-character-being-added-to-output/#findComment-1301720 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.