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...
zidaine 0 Newbie Poster
Recommended Answers
Jump to Posthttp://www.w3schools.com/php/php_mysql_select.asp Check this. Instead of echoing $row and $row 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; ?>">
…
Jump to Posttextbox inside <?php tags ? Yep, you have to echo it. But this way.
echo "<input type=\"text\" name=\"name\" value=\"$firstname\">";
All 9 Replies
nav33n 472 Purple hazed! Team Colleague Featured Poster
karthik_ppts commented: helpful post +5
zidaine 0 Newbie Poster
nav33n 472 Purple hazed! Team Colleague Featured Poster
jino -1 Junior Poster
vijiv 0 Newbie Poster
sebin george 0 Newbie Poster
sebin george 0 Newbie Poster
Persi 0 Newbie Poster
Persi 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.