squiblo Posted July 27, 2009 Share Posted July 27, 2009 ok my aim is to move a certain picture 34px from the top if they are logged in how do i go about doing this? Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/ Share on other sites More sharing options...
gevans Posted July 27, 2009 Share Posted July 27, 2009 Got any code? ... Add a class to your css with a top margin. if logged in assign the class to the image Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/#findComment-884208 Share on other sites More sharing options...
squiblo Posted July 27, 2009 Author Share Posted July 27, 2009 <div id="wb_Shape2" style="position:absolute;left:54px;top:170px;width:793px;height:412px;z-index:10" align="center"> <img src="/Images/body_img.jpg" id="Shape2" align="top" alt="" title="" border="0" width="793" height="412"></div> this is my image that i wont moving 34px from the top if someone is logged in, i have not got to learn any css yet Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/#findComment-884216 Share on other sites More sharing options...
gevans Posted July 27, 2009 Share Posted July 27, 2009 have you learnt any php?? I'll need that as well Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/#findComment-884217 Share on other sites More sharing options...
squiblo Posted July 27, 2009 Author Share Posted July 27, 2009 i know that for this it will look some thing like <?php session_start(); if(!isset($_SESSION['myusername'])){ [/code but i dont know how i could move a picture Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/#findComment-884222 Share on other sites More sharing options...
gevans Posted July 27, 2009 Share Posted July 27, 2009 <?php session_start(); echo '<div id="wb_Shape2" style="position:absolute;left:54px;width:793px;height:412px;z-index:10;'; if(isset($_SESSION['myusername'])) { echo 'top:204px;'; } 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>'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/167661-solved-if-logged-in/#findComment-884224 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.