Jump to content


Photo

php - html question


  • Please log in to reply
4 replies to this topic

#1 Chris Val Kef

Chris Val Kef
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 09 September 2006 - 01:06 PM

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!

#2 onlyican

onlyican
  • Members
  • PipPipPip
  • Advanced Member
  • 921 posts
  • LocationHants - UK

Posted 09 September 2006 - 01:37 PM

that should work
try
<?php
echo "<input type='text' name='username' value='".$_POST["username"]."' />\n";
Tell me the problem, I will try tell you the solution

#3 Rectifier

Rectifier
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 09 September 2006 - 01:40 PM

have you tried to echo the <input>?

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


#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 09 September 2006 - 01:40 PM

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.
Legend has it that reading the manual never killed anyone.
My site

#5 Chris Val Kef

Chris Val Kef
  • Members
  • PipPip
  • Member
  • 25 posts

Posted 09 September 2006 - 07:48 PM

thanx guys.

I solved the problem with session variables...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users