Fenhopi Posted May 18, 2010 Share Posted May 18, 2010 Hey, I have a variable that's defined in one file, and I need to use it in another file, is there any easy way to retrieve it? I tried making a form, storing it in a label as a value, then retrieving it with the other file through $POST. This did not work unless I have a textbox, but I don't want the user to be able to edit it. Please help. Link to comment https://forums.phpfreaks.com/topic/202118-using-a-variable-defined-in-one-file-in-another/ Share on other sites More sharing options...
kenrbnsn Posted May 18, 2010 Share Posted May 18, 2010 You can use an input of type "hidden" or "disabled". The first will not show on the form, the second will but won't be changeable. You can also pass the value via sessions. Ken Link to comment https://forums.phpfreaks.com/topic/202118-using-a-variable-defined-in-one-file-in-another/#findComment-1059867 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.