Displaying database entries in an input text box
Posted: Tue Jul 27, 2010 12:38 am
Hi...I want to know that is it possible to display that data that is stored in the database in a textbox with the help of javascript. I am able to do this with php but the problem is mis-location of the text or data in the textbox. I want to show the data in the text box from the first position. The php code I am using is:
Is there anything wrong in the php code or mis-location of text can only be prevented using ajax or javascript. If yes, please tell me the solution.
Code: Select all
// suppose I want to show the data stored in '$y' variable in the text box
<textarea name="name" id="2" cols="23" rows="10">
<?php echo "$y"; ?> </textarea>