Dville Posted July 7, 2006 Share Posted July 7, 2006 so here's my codehttp://www.phpfi.com/128426you can see on line 50, from a cookie, a string is being put into the variable $usernamealso on line 96 i start a php form. What I would like to do is take $username, and put it into a hidden field, which i should be able to make hidden with[code]<input type=hidden[/code]but how can i insert $username into this field. i would use name=username so i can grab it from backend.phpcould i do 'value=$username'?thanks in advanced for anyone who can help. Link to comment https://forums.phpfreaks.com/topic/13913-forms-hidden-fields-and-variables/ Share on other sites More sharing options...
kenrbnsn Posted July 7, 2006 Share Posted July 7, 2006 You would do something like:[code]<input type="hidden" name="username" value="<?php echo $username ?>">[/code]Ken Link to comment https://forums.phpfreaks.com/topic/13913-forms-hidden-fields-and-variables/#findComment-54194 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.