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 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]); 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']); Link to comment https://forums.phpfreaks.com/topic/95757-dynamic-url-generating/#findComment-490345 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.