Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php display info in form

Tags:

html

php

I have a function allowing members to update their personal details when they have logged in, the update page features a form the user will fill in and when the submit button is pressed the deatils are updated. This works fine, I am wanting to display the users current details in the appropriate text filed in the form e.g. the firstname text field will have value "James" and the user can delete this to enter "jim". Is it something to do with adding a value to the form field? My form is shown below.

    <tr>
    <td width="78">Firstname</td>
    <td width="6">:</td>
    <td width="294"><input name="firstname" type="text" id="firstname"></td>
    </tr>
    <tr>
    <td width="78">Surname</td>
    <td width="6">:</td>
    <td width="294"><input name="surname" type="text" id="surname"></td>
    </tr>

Any help is much appreciated

like image 653
user1368371 Avatar asked Jan 01 '26 03:01

user1368371


1 Answers

Print value inside the text box.

<input type="text" value="<?php echo $someValue; ?>" />


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!