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