Warptweet Posted February 9, 2007 Share Posted February 9, 2007 how can I make a form field be FORCED to be $session-->username For instance, if $session-->username is "Warptweet", then the feild will be forced to equal "Warptweet" Quote Link to comment https://forums.phpfreaks.com/topic/37717-force-field-value-to-be-session-username/ Share on other sites More sharing options...
Warptweet Posted February 9, 2007 Author Share Posted February 9, 2007 Oh, and by the way... What I mean is usually people would type in text, right? But instead of the user typing in text, the field will AUTOMATICALLY equal $session-->username and without letting them typing it in the field. Quote Link to comment https://forums.phpfreaks.com/topic/37717-force-field-value-to-be-session-username/#findComment-180459 Share on other sites More sharing options...
Jessica Posted February 9, 2007 Share Posted February 9, 2007 You could just print it instead of using an input, that way they won't even try to edit it. Quote Link to comment https://forums.phpfreaks.com/topic/37717-force-field-value-to-be-session-username/#findComment-180488 Share on other sites More sharing options...
artacus Posted February 9, 2007 Share Posted February 9, 2007 Exactly. Why even have it there? But... <input type='text' name='login' value='<?=$_SESSION['username'] ?>' DISABLED /> Quote Link to comment https://forums.phpfreaks.com/topic/37717-force-field-value-to-be-session-username/#findComment-180491 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.