<? php $text = "hello world"; ?>
<input type="text" value="<?php echo $text; ?>">
in the browser gives me an input box with value:
Notice:  Undefined variable: text in C:\xampp\htdocs\FIRST-PROJECT\index.php on line 26
<? php $text = "hello world"; ?>
<input type="text" value="<?php echo $text; ?>">
in the browser gives me an input box with value:
Notice:  Undefined variable: text in C:\xampp\htdocs\FIRST-PROJECT\index.php on line 26
 
    
    <? php isn't a valid tag, so you're never creating $text. There is an extra space in there.   Close the space after the ?, and make it <?php.