Log in

View Full Version : how to take input & display output in a common input text box



dewan
05-22-2011, 06:01 AM
hello everyone
i have make a from containing 6 input text box with a submit button.
now i want to use this form in various purpose. at one view i want to use this a input from and another view i want to display data from database. i m able to retrieve data from database. if i display data then unable to take input.

<input type="textbox" name="uname" value="<?php echo $name;">

this code shows error while i want to take input.

fastsol1
05-22-2011, 01:15 PM
You forgot to close the php tag here

value="<?php echo $name;">
should be this

value="<?php echo $name;?>">

dewan
05-23-2011, 11:42 AM
thanks for ur reply. but it was just a typing mistake. this process doesn't allow to take input from mentioned textbox.

bluewalrus
05-23-2011, 01:13 PM
Please post all of your code.

djr33
05-24-2011, 03:49 AM
There's another typo: your variable is $name but your textbox is "uname"

traq
05-24-2011, 04:20 AM
this process doesn't allow to take input from mentioned textbox.

it should. if the user doesn't clear the textbox and type something else, then when the form is submitted it will simply hold the same value you gave it. have you tried this and encountered problems?