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! Link to comment https://forums.phpfreaks.com/topic/20220-php-html-question/ 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"; Link to comment https://forums.phpfreaks.com/topic/20220-php-html-question/#findComment-88934 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] Link to comment https://forums.phpfreaks.com/topic/20220-php-html-question/#findComment-88936 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. Link to comment https://forums.phpfreaks.com/topic/20220-php-html-question/#findComment-88938 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... Link to comment https://forums.phpfreaks.com/topic/20220-php-html-question/#findComment-89059 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.