Skip to content
Advertisement

How to echo html in php with link to database? [closed]

below is what i had tried:

echo "<input class='form-control' type='text' name='jobID'  value='.$result['jobID'].' readonly>";

or

echo "<input class='form-control' type='text' name='jobID'  value=<?php $result['jobID'];?>readonly>";

thank you so much

Advertisement

Answer

HTML IN PHP

 echo "<input class='form-control' type='text' name='jobID'  value='".$result['jobID'];."'readonly />";

PHP IN HTML

<input class='form-control' type='text' name='jobID'  value='<?php echo $result['jobID']; ?>' readonly />
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement