I'm trying to default a value in a field to the current date, but my code:
<?php
echo '<input type="text" name="makeupassignment" size="50" value="'.date("m/d/y").'">';
?>
is only printing this:
';
?>
I'm trying to default a value in a field to the current date, but my code:
<?php
echo '<input type="text" name="makeupassignment" size="50" value="'.date("m/d/y").'">';
?>
is only printing this:
';
?>
Looks to me that the web page is not running through the PHP interpreter. Check out the source for the web page. Do you see the PHP source code when you click "show source" in your browser?
I think what happens is that your browser parses this as follows:
I would guess that PHP is not enabled/installed on the webserver you're testing with. View source on that page and you'll see all your code, I bet
Basically, PHP is not parsing the page for it's code.
php -v
in a console/terminal window.