Jump to content

what is wrong?


squiblo

Recommended Posts

i think that i have my thinking all wrong:

 

<?php   
echo '<div id="copyright" style="position:absolute;left:55px;width:150px;height:44px;z-index:32">';
if(isset($_SESSION['myusername']))
{
   echo 'top:628px;';
}
else
{
   echo 'top:588px;';
}
echo '" align="left">
<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009</font></div>';
?>

<div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left">
<?php
if(isset($_SESSION['myusername']))
echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009>';
?>
</font></div>

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/
Share on other sites

You used a double quote instead of a single quote on the first echo...

<?php   
echo '<div id="copyright" style="position:absolute;left:55px;width:150px;height:44px;z-index:32';
if(isset($_SESSION['myusername']))
{
   echo 'top:628px;';
}
else
{
   echo 'top:588px;';
}
echo '" align="left">
<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009</font></div>';
?>

<div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left">
<?php
if(isset($_SESSION['myusername']))
echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009>';
?>
</font></div>

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/#findComment-884268
Share on other sites

basically i wont to move this text 30px from top if logged in:

<div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left">
<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#169; 2009</font></div>

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/#findComment-884296
Share on other sites

<?php
echo '<div id="wb_Shape2" style="position:absolute;left:54px;width:793px;height:412px;z-index:10;';
if(isset($_SESSION['myusername']))
{
   echo 'top:200px;';
}
else
{
   echo 'top:170px;';
}
echo '" align="center">
<img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div>';
?>


<div id="menubar" style="position:absolute;left:54px;top:168px;width:793px;height:30px;z-index:13" align="center"> 
<?php
if(isset($_SESSION['myusername']))
echo '<img src="/Images/header_img.jpg" id="menubar" align="top" alt="" title="" border="0" width="793" height="30">';
?>
</div>

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/#findComment-884305
Share on other sites

Whenever I'm creating an app that changes appearance in accordance with whether the user is logged in or not, I check whether they are logged in at the beginning of the code, in order to male things easier:

 

$logged_in = false;
//IF statement determining whether user is logged in or not - assigning true or false

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/#findComment-884312
Share on other sites

i tried something different but there is an error  :shrug: i cant seem to do this with text:

<div id="copyright" style="position:absolute;left:55px;top:628px;width:150px;height:44px;z-index:32" align="left">
<?php
if(isset($_SESSION['myusername']))
   echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#38;#169; 2009';
?>
</font></div>

<div id="copyright" style="position:absolute;left:55px;top:588px;width:150px;height:44px;z-index:32" align="left">
<?php
{
   else
} 
?>
echo '<font style="font-size:13px" color="#000000" face="Arial">Squiblo &#38;#169; 2009';
</font></div>
<?php
}
?>

Link to comment
https://forums.phpfreaks.com/topic/167672-what-is-wrong/#findComment-884317
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.