jayteepics Posted March 6, 2012 Share Posted March 6, 2012 Just set up a new wamp environment and in this new [stricter] environment I'm getting masses of warnings I never saw before (mea culpa):- e.g. Use of undefined constant name - assumed 'name' in C:\wamp\www... This is the sort of thing I have coded.. $_SESSION['address'][name] = $name; then later.... $name = $_SESSION['address'][name]; Should this be changed to... $_SESSION['address']['name'] = $name; and... $name = $_SESSION['address']['name']; Jamie Quote Link to comment https://forums.phpfreaks.com/topic/258391-guess-ive-been-getting-away-with-this-but-would-like-to-fix-it-please/ Share on other sites More sharing options...
batwimp Posted March 6, 2012 Share Posted March 6, 2012 Probably. Try it and see if it works. Quote Link to comment https://forums.phpfreaks.com/topic/258391-guess-ive-been-getting-away-with-this-but-would-like-to-fix-it-please/#findComment-1324503 Share on other sites More sharing options...
ManiacDan Posted March 6, 2012 Share Posted March 6, 2012 Yes, bare strings are not allowed unless they're constants. Strings must be quoted. Quote Link to comment https://forums.phpfreaks.com/topic/258391-guess-ive-been-getting-away-with-this-but-would-like-to-fix-it-please/#findComment-1324506 Share on other sites More sharing options...
jayteepics Posted March 6, 2012 Author Share Posted March 6, 2012 Yes, bare strings are not allowed unless they're constants. Strings must be quoted. Many thanks for that. Quote Link to comment https://forums.phpfreaks.com/topic/258391-guess-ive-been-getting-away-with-this-but-would-like-to-fix-it-please/#findComment-1324510 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.