Thanks for that, the amount of times I have read over counting them { is unbelievable.
Ok I now have a working front page, registration only works sending me to the Year 2 page not Year 1?
here is the code on my login page for the redirection;
//redirect them to the usersonline page
if ($YearofStudy=="Year 1")
{
header("location: 1st Year.php");
}
else
{
header("location: Year2Homepage.php");
//split all fields fom the correct row into an associative array
$row = mysql_fetch_assoc($res);
On the Year 2 home page I have the following error warning;
Warning: Wrong parameter count for strcmp() in /home/########/#####_html/Year2Homepage.php on line 50
This is the php for that section;
<?php
//if the login session does not exist therefore meaning the user is not logged in
[B]"Line 50"[/B] [COLOR="red"]if(strcmp($_SESSION['uid']."'") == 0){[/COLOR]
//display and error message
echo "<center>You need to be logged in to user this feature!</center>";
}else{
//otherwise continue the page
//this is out update script which should be used in each page to update the users online time
$time = date('U')+50;
$update = mysql_query("UPDATE `users` SET `online` = '".$time."' WHERE `id` = '".$_SESSION['uid']."'");
?>
I have wrote "Line 50" and coloured that line red to try and help you guys!