Hi,
Basically I want to be able to check and display a specific content in a particular part of a page! I can't use define function because defined can be checked by both of them and will displays twice, so want to display it once!
I have a function called 'login' that displays the login form and all the other bits of it, and within this function I check where it should be displayed, either 'left' or 'right' and that is stored in the database! That works fine!
But the problem is when I define the positions, the login function displays twice, here is my code! Have a look PLEASE!
...
<div id="left">
$position = left;
define($position, 1);
login();
</div>
...
<div id="right">
$position = right;
define($position, 1);
login();
</div>
...
And here is the login function that checks it!
function login(){
$position = left;
if(defined('$position')){
...Then display the login and other...
}
}
So as the login function position is = left, it should only displays it in left column, but it displays in both positions...
Can somebody help me with this! I know that define doesn't works here! But that's all I guessed!!!
Can somebody tell me a better way!
Thanks in advance!!!