br3nn4n Posted January 8, 2008 Share Posted January 8, 2008 Code: <?php echo "<input type=\"text\" name=\"page\" value=\"<?php date(D); ?>\">"; ?> Results in a text box with the text "<?php date(D); ?>" in it. How do I do it? TIA Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 <?php echo "<input type=\"text\" name=\"page\" value=\"".date("m.d.y")."\">"; ?> Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 8, 2008 Share Posted January 8, 2008 either do this: <?php echo "<input type=\"text\" name=\"page\" value=\"".date(D)."\">"; ?> or this: <input type="text" name="page" value="<?php echo date(D); ?>"> Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted January 8, 2008 Share Posted January 8, 2008 The D still have to be in quotes right? Quote Link to comment Share on other sites More sharing options...
GingerRobot Posted January 8, 2008 Share Posted January 8, 2008 The D still have to be in quotes right? Yes. Unless you happened to have a constant called D which contained the string 'D'... Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 8, 2008 Share Posted January 8, 2008 yeah...D in quotes...sorry about that Quote Link to comment Share on other sites More sharing options...
br3nn4n Posted January 8, 2008 Author Share Posted January 8, 2008 Awesome, works! Thanks once again everyone Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.