how to insert the database value into a text box by using php

advertisements

i want to know how to insert sql values into a text box within a table is it possible? tried several codes but doesn't seem to work here's my latest code

print "<td>" .<input type = "text" name = "text" value = "<?php print $row["Quantity"]; ?>" />. "</td>";


This is some weird/invalid formatting you have there. Assuming the value from the database is actually in $row['Quantity'], you should try this:

print '<td><input type="text" name="text" value="' . $row["Quantity"] . '"</td>';