i have no idea on where to start but this is what iv got: it is the home page of my mobile site:
<?php
include('header_application.php');
$ pageValue = "dashboard";
$ obj_clean->check_user();
//initialize variables that might be empty
if (empty($ aCleanPost['mood_description']['value'])) $ aCleanPost['mood_description']['value'] = "";
if (empty($ aCleanPost['mood_colour']['value'])) $ aCleanPost['mood_colour']['value'] = "";
if (empty($ aCleanPost['mood']['error'])) $ aCleanPost['mood']['error'] = "";
$ msg = isset($ aCleanPost['message']) ? $ aCleanPost['message'] : "";
if (isset($ aCleanPost['success']))
{
$ aCleanPost['mood_description']['value'] = "";
$ aCleanPost['mood_colour']['value'] = "";
//success msg
$ msg = "Your mood has been updated";
}
//Get dynamic data required for this page from the database
$ news = $ obj_clean->getNewsHeadlines();
$ numOfMessages = $ obj_clean->getUnopenedMessagesCount($ _SESSION['user_id']);
$ blocked_users = $ obj_clean->getBlocklistCount($ _SESSION['user_id']);
$ moods = $ obj_clean->getMoodInfo($ _SESSION['user_id']);
$ moodTemp = $ obj_clean->getMoodTemp($ _SESSION['user_id']);
include ("header.php");
?>
<div class="innerContainer">
<span class="headings">WELCOME <?php echo strtoupper($ _SESSION['user_name']); ?></span>
<br/>
<span class="headings_sub">
<span class="blue_text">TO RAINBOW</span> CODE <span class="blue_text">...SHINE ON</span>
</span>
<?php echo $ msg != "" ? "<font class='errorText'>".$ msg."</font>" : ""; ?>
<br/><br/>
<form action="<?php echo ADDRESS; ?>profile_search.php?user_id=<?php echo $ _SESSION['user_id']; ?>" method="post" name="search_form">
<input type="hidden" name="FormName" value="profile_search" />
<span class="headings_sub"><span class="blue_text">PROFILE SEARCH</span></span><br/>
<input class="blue_border" type="text" name="search" value="" />
<input style="border: 0px; vertical-align: bottom; border:none; border: hidden; border-color: #000000;" type="image" src="<?php echo IMAGES; ?>template/go.png" />
</form>
<br/><br/>
<span class="headings2">RAINBOWCODE NEWS</span><br/>
<?php
echo "<img style='vertical-align: bottom; margin-right: 10px;' src='".IMAGES."template/req.png' width='21' height='20' />";
//as per andre 18/07/2011
echo "<a href='http://spreadsheets.google.com/a/miranetworks.net/spreadsheet/viewform?formkey=dEVlYTdJTzZiU0JPTnZqYWlZQTJRZ0E6MQ' class='pink_link'> Rate us! Complete the online questionnaire</a>";
echo "<br/>";
//echo "Latest News<br/>";
foreach ($ news as $ headline)
{
echo "<img style='vertical-align: bottom; margin-right: 10px;' src='".IMAGES."template/req.png' width='21' height='20' />";
echo $ headline['news']."<br/>";
}
?>
<br/><br/>
<span class="headings2">MY FEEDS</span><br/>
<?php
if ($ numOfMessages <> 0)
{
echo "<span class='headings_sub'>You have ".$ numOfMessages." </span>";
echo "<a class='red_link' href='".ADDRESS."messages.php'> unopened Messages</a>";
}
else
{
echo "<span class='headings_sub'>You have no new messages</span>";
}
echo "<br/>";
if ($ blocked_users > 0)
{
echo "<span class='headings_sub'>You have ".$ blocked_users." blocked users</span>";
//echo "<a class='red_link' href='".ADDRESS."messages.php'> blocked users</a>";
}
else
{
echo "<span class='headings_sub'>You have blocked no users</span>";
}
?>
<br/><br/>
<span class="headings2">MOOD BAROMETER</span><br/>
<a href="<?php echo ADDRESS; ?>barometer.php" class="blue_link">How does it work?</a><br/>
<span class="headings_sub">
Mood Description<br/>
<span class="<?php echo $ moodTemp; ?>"><?php echo $ moods['mood_desc']; ?></span> <br/>
Mood Colour<br/>
<span class="<?php echo $ moodTemp; ?>"><?php echo $ moods['mood_color']; ?></span>
</span>
<br/><br/>
<form name="changeMood" action="<?php echo ADDRESS; ?>dashboard.php" method="post">
<input type="hidden" name="FormName" value="change_mood" />
<span class="headings2">CHANGE MOOD</span><br/>
<span class="headings_sub">
<?php echo $ aCleanPost['mood']['error'] != "" ? "<font class='errorText'>".$ aCleanPost['mood']['error']."</font><br/>" : ""; ?>
Mood Description<br/>
<input type="text" maxlength="32" name="mood_description" value="<?php echo $ aCleanPost['mood_description']['value']; ?>" class="blue_border"/><br/>
Mood Colour<br/>
<input type="text" maxlength="32" name="mood_colour" value="<?php echo $ aCleanPost['mood_colour']['value']; ?>" class="blue_border"/>
</span>
<br/>
<input style="margin-top: 5px; border: 0px; border: none; border: hidden; border-color: #000000;" type="image" src="<?php echo IMAGES; ?>template/go.png" />
</form>
</div>
<?php include("footer.php"); ?>
there is only one variable i need to refresh on this page: $ numOfMessages, as messages come in it must update so the user can see there are more new messages
please help?
thank you