Travist6983 Posted July 2, 2008 Share Posted July 2, 2008 Ok i am kinda new to PHP and need some help i am trying to accomplish is in the first string below i need $str to include 'realcomp:<and our agents MLS ID> the MLS ID is coming from our database where REALCOMP is just the word or text i know the string at the bottom will work if i manually put in the <?php $str = 'REALCOMP:<Manually putting in MLS ID here> but i need it to come from our database <?php $str = 'REALCOMP:' echo $agentInfo['mlsnAgentID']; ?> <a href="http://we.showingdesk.com/Redirector.aspx?TYPE=1&ID1=REALCOMP&ID2=<?php echo $agentInfo['mlsnAgentID']; ?>&SIG=<?php echo base64_encode($str); ?>&KEY=900499-48334:108" target="_blank"><img src="images/logos/ShowingDeskWE.jpg" width="190" height="46" border="0"></a> Please help i am sooooo stuck Thanks Quote Link to comment https://forums.phpfreaks.com/topic/112966-base64_encode/ Share on other sites More sharing options...
Jabop Posted July 2, 2008 Share Posted July 2, 2008 ...and the problem is? Quote Link to comment https://forums.phpfreaks.com/topic/112966-base64_encode/#findComment-580277 Share on other sites More sharing options...
Travist6983 Posted July 2, 2008 Author Share Posted July 2, 2008 PHP Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Inetpub\wwwroot\century21today.com\team\agentTools2.php on line 117 ...this is the error i am getting with that previous code i know the problem lies in the area highlighted in red <?php $str = 'REALCOMP:' echo $agentInfo['mlsnAgentID']; ?> Quote Link to comment https://forums.phpfreaks.com/topic/112966-base64_encode/#findComment-580281 Share on other sites More sharing options...
anon_login_001 Posted July 2, 2008 Share Posted July 2, 2008 Quote <?php $str = 'REALCOMP:' echo $agentInfo['mlsnAgentID']; ?> Should be <?php $str = 'REALCOMP:' . $agentInfo['mlsnAgentID']; ?> The 'period' adds/concatenates strings together. 'echo' sends data to the browser. Quote Link to comment https://forums.phpfreaks.com/topic/112966-base64_encode/#findComment-580339 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.