I am fairly new to web development and I am currently working on an HTML form with a text input field. I want to pre-fill the value of this field with a PHP variable. However, I'm not sure how to do this correctly.
Here's what I have tried so far:
<input type="text" value="<?php echo $myVariable; ?>">
<input type="submit" value="Submit">
But when I load the page, the input field just displays `<?php echo $myVariable; ?>` as plain text, rather than the value of the variable.
Am I missing something here? How can I properly use a PHP variable as the value of an HTML text input?
Your help would be greatly appreciated. Thanks in advance!