![]() |
| ||
| how to insert database value to a textbox hi i'm a newbie in php, plz help me with this. how can i put the value of my database to a textbox? can u give me a sample code.. thx... |
| ||
| Re: how to insert database value to a textbox http://www.w3schools.com/php/php_mysql_select.asp Check this. Instead of echoing $row['FirstName'] and $row['LastName'] in the example, assign it to a variable and use it as the 'value' of the textbox. <input type="text" name="firstname" value="<?php echo $firstname; ?>"> |
| ||
| Re: how to insert database value to a textbox Quote:
thx nav33n. but how about textboxes inside a <?php ?>tags? do i have to echo <input type="text" name="firstname" value="<?php echo $firstname; ?>">? |
| ||
| Re: how to insert database value to a textbox textbox inside <?php tags ? Yep, you have to echo it. But this way. echo "<input type=\"text\" name=\"name\" value=\"$firstname\">"; |
| ||
| Re: how to insert database value to a textbox Or u can write as echo "<input type='text' name='name' value='$firstname'>"; |
| All times are GMT -4. The time now is 5:55 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC