sanelv Posted March 12, 2008 Share Posted March 12, 2008 Hi, I need to pass a dynamic value via a variable to another page. I am sure this sounds simple but when I use the following code the following error appears. $MM_redirectLoginSuccess variable is passing the assigned value to next page as the url What should i Do, Code: $MM_redirectLoginSuccess = "list.php?user=<?php echo $row_rsUsers['username']; ?>"; Error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\wamp\www\CRM\login.php on line 53 Quote Link to comment https://forums.phpfreaks.com/topic/95757-dynamic-url-generating/ Share on other sites More sharing options...
laffin Posted March 12, 2008 Share Posted March 12, 2008 MM_redirectLoginSuccess = "list.php?user=$row_rsUsers[username]"; that is if u dun have any special chars in the username otherwise use MM_redirectLoginSuccess = "list.php?user=". urlencode($row_rsUsers[username]); Quote Link to comment https://forums.phpfreaks.com/topic/95757-dynamic-url-generating/#findComment-490288 Share on other sites More sharing options...
skidz Posted March 12, 2008 Share Posted March 12, 2008 $MM_redirectLoginSuccess = "list.php?user=<?php echo $row_rsUsers['username']; ?>"; change to $MM_redirectLoginSuccess = "list.php?user=".urlencode($row_rsUsers['username']); Quote Link to comment https://forums.phpfreaks.com/topic/95757-dynamic-url-generating/#findComment-490345 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.