Jump to content


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


PHP method to input text into an input box

Recommended Posts

I know you can use value. But value doesn't show up on firefox. It also removes itself when the user selects the input box.

I want to call data from the database and display it in an input box so a user can edit and change it. Does anyone know how i can do this?

Share this post

Link to post
Share on other sites
Retrieve the specific data from your database and display it using the appropriate form type as shown below.  It will show up with any browser.

[code]<input type="text" name="something" value="<?php echo $something;?>"/>[/code]

[code]<textarea rows="5" cols="30" name="something"><?php echo $something;?></textarea>[/code]

After the user changes the displayed data and submits the form, read the new value of 'something' and UPDATE the appropriate row of your database table.

Without seeing any of your code, it's difficult to be more specific about solving your problem.

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.