hi people.
i am building a simple social network for my CAS (i am doing IB diploma) and when i came to the home page where i all the friends statuses are viewd i got a problem
here is my home page's code:
<?php
if(!isset($_COOKIE['ln']))
{
header("location : index.php");
}
else
{
?>
<html>
<head>
<title>Welcome Home <?php $md = $_COOKIE['ln'];
include_once "classes/class_lib.php";
$db = new db();
$db->connect();
mysql_select_db("gha_link") or die("cant select the gha link");
$q = mysql_query("SELECT * FROM members WHERE md5='$md'") or die("cant do the sql query");
while($row = mysql_fetch_array($q)){ echo $row['name']; } $db->close(); ?></title>
<script src="../../SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script src="../../SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script>
<script src="../../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="../../SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" />
<link href="../../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="CollapsiblePanel1" class="CollapsiblePanel">
<div class="CollapsiblePanelTab" tabindex="0">Toolbar</div>
<div class="CollapsiblePanelContent"><div id="header" style="width:100%; height:3em; background-color:#00FF33; text-align:left; color:#0000FF; font-family:Arial, Helvetica, sans-serif; font:Arial, Helvetica, sans-serif; font-size:16px;"><form action="search.php" method="get">
<a href="email/display.php" title="Read Your Emails"><img src="images/1295686099_email_open.png" width="40" height="40" /></a>
<a href="notifications/index.php" title="Read Your Notification"><img src="images/1295686161_notifications.png" width="40" height="40" /></a>
<a href="friends/display.php" title="See Your Friends"><img src="images/1295642830_Community_Help.png" width="40" height="40"/></a>
<a href="groups/display.php" title="See Your Groups"><img src="images/Social_network.png" width="40" height="40" /></a>
<a href="profile/index.php" title="Open Your Profile"><img src="images/1295685730_User_Info.png" width="40" height="40" /></a>
<span id="sprytextfield1">
<input type="text" name="q" title="Search...." size="60" style="color:#FF0000; height:30px;" />
<span class="textfieldRequiredMsg">The Search Text is required.</span></span>
<input type="image" src="images/1295686215_search_user.png" width="50" height="50" /></form>
</div></div>
</div><BR /><BR />
<div id="container">
<table width="100%">
</table>
</div>
<script type="text/javascript">
<!--
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1");
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
//-->
</script>
<?php
}
?>
<table width="100%" style="height:auto; background-color:#FFFFFF;">
<tr style=" width:30%;" bordercolor="#FFFFFF" id="LEFT">
<td style="width:29%; height:auto; background-color: #00FF00; color:#000001;">Welcome to to your home page !<BR />
<img src="images/1295640857_personal.png" width="128" height="128" align="middle" title="Your Profile Picture" />
<!-- the end of the side bar -->
</td>
<td style="width:70%; background-color:#FFFFFF; padding:1.5em;">
Your stauts :------------------------------------------------------------------------------<br />
<br />
<form action="submit_status.php" method="post"><textarea cols="100" rows="5" title="please write what is in your mind here">what are you thinking about ?</textarea><br />
<input type="image" src="images/1295685949_Blog_Artdesigner.lv.png" width="60" height="60" style="float:right;" title="Press here to post your stauts" />
</<br />
<br />
Your friends Statuses :- <br />
<?php
include_once "classes/class_lib.php";
$db = new db();
$db->connect();
$s = mysql_select_db("gha_link") or die("cant select the database gha_link".mysql_error());
// this cookie is saved when the person is loged in
$md = $_COOKIE['ln'];
$select_friends = mysql_query("SELECT * FROM friends WHERE frequested = '$md'");
if(!$select_friends)
{
die("cant select your firends from the database".mysql_error());
}
else
{
if(mysql_num_rows($select_friends) == 0)
{
echo "You have no friends yet!";
}
else
{
while($rows = mysql_fetch_array($select_friends))
{
$select_stautses = mysql_query("SELECT * FROM stautses WHERE owner='$rows[\'id\']'");
}
}
}
?>
</td>
</tr>
</table>
and when i run the code i get the following error:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\CAS\GHA link\home.php on line 101
please tell me what to do .
thanks