Hi,
I am having problems passing sessions variable in url. I am trying to pass a session variable in the ECHO statement. The code works, except that the session username is not passed into the link. Any kind of help is appreciated.
Thanks
RK
here is the code
<?
if($session->logged_in)
{
echo '<td width="8%" height="47" bgcolor="#FCFCFC" style="border-left-width: 0; border-right-style: dotted; border-right-width: 1px; border-top-width: 0; border-bottom-width: 0">';
echo '<div class="buttonscontainer">';
echo '<div class="buttons">';
echo '<a class="buttons" href="\userinfo.php?user=$session->username\"><strong>Your Profile</strong></a>'; -- PROBLEM AREA
echo '<a class="buttons" href="/home.php">Home</a>';
echo '<a class="buttons" href="/about_us.php">About Us</a>';
echo '<a class="buttons" href="/for_rent.php">For Rent</a>';
echo '<a class="buttons" href="/resident_area.php">Resident Area</a>';
echo '<a class="buttons" href="/links.php">Links</a>';
echo '<a class="buttons" href="/process.php">Logout</a>';
echo '</div>';
echo '</div>';
echo '</td>';
}
else
{
echo '<td width="8%" height="47" bgcolor="#FCFCFC" style="border-left-width: 0; border-right-style: dotted; border-right-width: 1px; border-top-width: 0; border-bottom-width: 0">';
echo '<div class="buttonscontainer">';
echo '<div class="buttons">';
echo '<a class="buttons" href="/home.php">Home</a>';
echo '<a class="buttons" href="/about_us.php">About Us</a>';
echo '<a class="buttons" href="/for_rent.php">For Rent</a>';
echo '<a class="buttons" href="/resident_area.php">Resident Area</a>';
echo '<a class="buttons" href="/links.php">Links</a>';
echo '</div>';
echo '</div>';
echo '</td>';
}
?>