Page 1 of 1

Upload Buttons available when logged in?

PostPosted: Thu Oct 18, 2012 10:32 pm
by DirectProject
Hello again,

need some help on getting around this i am comeing to term now with this script, i am making at top menu bar for the register/login bit, but i dont want the upload buttons to apear on the upload.php or the basic.php, i would like the users to register before they see that button, and the upload buttons to be within a controle pannel, because i want to put more information on the first screen upload.php, i have used the mod for this and got that working but i need help on the hiding the buttons, alos i need help with adding a log out button when the user is logged in and a login button when the user isnt logged in =D...

Hope that wasent to much... but when you explain and help me i understand more!

thanks!

Re: Upload Buttons available when logged in?

PostPosted: Sun Oct 21, 2012 3:08 am
by SamEA
DirectProject wrote:Hello again,

need some help on getting around this i am comeing to term now with this script, i am making at top menu bar for the register/login bit, but i dont want the upload buttons to apear on the upload.php or the basic.php, i would like the users to register before they see that button, and the upload buttons to be within a controle pannel, because i want to put more information on the first screen upload.php, i have used the mod for this and got that working but i need help on the hiding the buttons, alos i need help with adding a log out button when the user is logged in and a login button when the user isnt logged in =D...

Hope that wasent to much... but when you explain and help me i understand more!

thanks!


You can use the following piece of code to restrict content from being shown to guests (unregistered users):
Code: Select all
if ($_SESSION['islogged'] == true){
     // Everything here is restricted to logged in users only
}else{
     // Content shown ONLY to guest
}


Here is an explain of restricting some html content from being displayed to guests:

Code: Select all
<?php
if($_SESSION['islogged'] == true){
?>
<b>Unlocked Content to Registered Users...</b>
<?php
}else{
?>
<b>You must login to display this content...</b>
<?php
}
?>


I hope my above examples have provided a clearer understanding.