I want users to register before they can see the order/cart process.
Something like this?
{if !$loggedin}
redirect => register.php
{else}
rest of code..
{/if}
Thanks
I want users to register before they can see the order/cart process.
Something like this?
{if !$loggedin}
redirect => register.php
{else}
rest of code..
{/if}
Thanks
Resolved:
{if !$loggedin}
{php}
header('Location: /register.php');
{/php}
{/if}
Ey! that's interesting - I'm looking for something that would make the client area restricted to only members.
This code seems fine, but I am not sure where I should put it. Can someone advice?
Thank you
I'd hazard a guess and put :
{if !$loggedin} in header.tpl
and
{/if} in footer.tpl
Hi
I have tried placing the above code inside cart.php to prevent none logged in users from accessing cart.php but i have got an error
Also i have tried to place it inside the header but nothing happened!
I have alos tried :
if ($_SESSION['uid']) {
# User is Logged In - put any code you like here
}else{
$goto="login";
include("login.php");
}
?>
And:
{if !$loggedin}
{php}
header('Location: https://mywebsite.com /register.php');
{/php}
Also no luck!
Any suggestions please?
WHMCS V5.2