Hi All Im developing a website here's my situation.
Im using one template and using template to link it to every page and using str_replace to replace parts of my site template for what is needed for each page. Any way my problem is this I have sidebar and in the sidebar i want to put a php scirpt which checks if a user is logged in or not
heres the code
<?php
$template= str_replace ("{_SIDE_URL1_}", session_start(); if(!session_is_registered(username))
{
echo href="http://www.mywebsite.com/Login.php" title="Login">Login;}else
{
echo href="http://www.mywebsite.com/logout.php" title="Logout">Logout</a>; },$template);?>
$template is for my site template
str_replace is replacing something called SIDE_URL1 which is in my site template.
IT gives me this error
Parse error: syntax error, unexpected ';' in /home/admin/public_html/test.php on line 16
Can any one help me tell me is there another way of doing this because it always gives me an error