my connect.php starts the session just so you know
i can navigate arround my site fine except when i come to this page. it lets me in but then when i try to leave no matter what page i go to or which page i come from it shows the error !is_authed
Also can someone check my code i wasnt sure if i could do a loop within another one
Code: <?php
include_once 'Connect.php';
if (!is_authed())
{
die ('You are not permitted to view this page, <a href="index.php">click here</a> to go back.');
}
?>
<html><head><title>Untitled Document</title>
<link href="style.css" rel="stylesheet" type="text/css"></head>
<body>
<div class=logo><?php include "logo.php";?></div>
<div class=navigationbarbox><?php include "navigationbar.php";?></div>
<div class=welcome>
<?php
// Checks friends
$member = $_SESSION["id"];
$query = ("SELECT * FROM friends WHERE member = '$member'");
$result= mysql_query ($query) or die ('Could not query.');
$exist = mysql_num_rows($result);
if($exist=='0')
{
echo"You have no friends";
}
else // if any friends gets
{
while ($row = mysql_fetch_assoc($result))
{
$friendwithid = $row["friendwith"];
$query = ("SELECT * FROM members WHERE $friendwith = '$friendwithid'");
$result= mysql_query ($query) or die ('Could not query.');
while ($row = mysql_fetch_assoc($result))
{
$photo = $row["photo"];
$username = $row["username"];
}
echo "<img src='http://www.myurl.co.uk/NEWTEACH/userimages/$photo' width='100' height='150'>
";
echo"$username
";
echo'<a href="friendsdelete.php?userid='.$userid.'">Remove Friend</a>';
}
}
?>
</div>
<div class=footerbox><?php include "footer.php";?></div>
</body>
</html>
Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is there any way to do it without using a database, and also eager to know a method to make to throw an
How to implement HTTP connection timeout
Hi All,I would like to implement an HTTP connection timeout.I am working on a application which uses HTTP connection, but the problem here is that the response from server is late... I want to create
LinkedList help
Ok so I just learned quickly about lists, so I have a not too hard project I think, but am having a few issues:Here is the project. Create a lovely polynomial calculator, that takes the equation from
Restricted access to sub-folder in iis6 doesn't work?
Basically I'm trying to add restriction to sub-folder (which contains pdf) in web.config for iis6 as below.It doesn't work at all. <system.web> <authentication
getting weird error..
okay, I'm getting an error on this particular function, something about the syntax in the mysql LIMIT statement, but as far as I can see I have it right, currently using easymysql3.0 as test server,
Troubles with a spider class
I am building a spider that will crawl through random whitepages (eg. anywho.com, switchboard.com, whitepages.com, etc..) and collect the information on the people found there and throw it into a
Help Ordering Arrays
Hi, I have 3 arrays as shown below.Code: $users = $this->get_latest_users();$flirt = $this->get_latest_flirts();$hotlist = $this->get_latest_hotlist();These arrays for a key have
exclude characters from counting?
Hello, I wanted to ask if you have a string like:Code: $my_s='ASRGREGTGTR----REGREGRE+++RRRRRR....';is there a way to count the length of the string, excluding non-word characters (+,- or .)?thank you
Basic Forum Tutorial
Hi, I'm new to PHP. I want to build a basic forum for my site using PHP and MySQL. I've searched the 'net, but every tutorial I found the writer seems to get 'too technical' after a few steps. I
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all tickets in grids. the problem is that the number of records are around 30 to 40 but there is a lag