I have a form which gets user's telephone and stores it in an database. Then I am fetching data from the database and place it on placeholder like this.

Telephone<input name="telephone" type="text" size="25" placeholder="<?php echo $user_data_profile['telephone']; ?>"/>

everything is fine. I want to make the placeholder's data to appear as an editable text, so that the user will have the option to change his telephone number easy. Any suggestions?

有帮助吗?

解决方案

I would suggest:

Telephone
<input name="telephone" type="text" size="25"
       placeholder="xxx-xxx-xxxx" value="<?=$user_data_profile['telephone']?>"/>

Using whatever phone number format that is relative to your area.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top