Chris Val Kef Posted September 9, 2006 Share Posted September 9, 2006 so here is my problem: i got a register form (personal info, username, password etc..). when i submit tha data i check in database if the username entered is used by an other user.if it's used i want to return the form filled with the submited data. i've tried to do it like this<input type="text" name="username" value="<?php echo $_POST["username"]; ?>">but no result.any ideas? thanx in advance! Quote Link to comment Share on other sites More sharing options...
onlyican Posted September 9, 2006 Share Posted September 9, 2006 that should worktry<?phpecho "<input type='text' name='username' value='".$_POST["username"]."' />\n"; Quote Link to comment Share on other sites More sharing options...
Rectifier Posted September 9, 2006 Share Posted September 9, 2006 have you tried to echo the <input>?[code]<?phpecho '<input type="text" name="username" value="' . $_POST["username"]; . '">?>[/code] Quote Link to comment Share on other sites More sharing options...
AndyB Posted September 9, 2006 Share Posted September 9, 2006 Should work ... if the database checking is in the same script as the form. If that's the case and it (still) isn't working then post the important parts of the script. Quote Link to comment Share on other sites More sharing options...
Chris Val Kef Posted September 9, 2006 Author Share Posted September 9, 2006 thanx guys.I solved the problem with session variables... Quote Link to comment 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.