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" 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. 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. 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 /> 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
Archived
This topic is now archived and is closed to further replies.