whelpton Posted January 31, 2009 Share Posted January 31, 2009 Im trying to use the following function in conjunction with my session variables. Ive never been good at explaining what im trying to do so Ill post the code to explain. <?php $source ='/home/alport/public_html/shared/profilecopy'; $target = "/home/alport/public_html/".$_SESSION['s_username']."/" full_copy($source, $target) ?> Basically, I am trying to get $target to point to /home/alport/public_html/Logged In user ($_session['s_username']) then end with a trailing slash. Every code I try just gives me a T_Error. Can someone point out what Im doing wrong please? Quote Link to comment https://forums.phpfreaks.com/topic/143311-solved-problem-with-session-variables/ Share on other sites More sharing options...
premiso Posted January 31, 2009 Share Posted January 31, 2009 I do not see session_start in your code, that is necessary on any page that uses session. $target = "/home/alport/public_html/".$_SESSION['s_username']."/"; full_copy($source, $target); Missing semi-colons. Quote Link to comment https://forums.phpfreaks.com/topic/143311-solved-problem-with-session-variables/#findComment-751623 Share on other sites More sharing options...
whelpton Posted January 31, 2009 Author Share Posted January 31, 2009 Thanks for the quick reply, Yes I do have session start at the top of my page and thanks for reminding me about semi-colons! Sometimes I feel like kicking myself for forgetting something so simple! Quote Link to comment https://forums.phpfreaks.com/topic/143311-solved-problem-with-session-variables/#findComment-751625 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.