Jump to content

Archived

This topic is now archived and is closed to further replies.

Chris Val Kef

php - html question

Recommended Posts

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!

Share this post


Link to post
Share on other sites
that should work
try
<?php
echo "<input type='text' name='username' value='".$_POST["username"]."' />\n";

Share this post


Link to post
Share on other sites
have you tried to echo the <input>?

[code]<?php
echo '<input type="text" name="username" value="' . $_POST["username"]; . '">
?>[/code]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.