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>
Multi Level Array Problem
hi all,For example I have array like below:$temp = array(array('north america', 'us', 'california'), array('north america', 'us', 'hawaii'), array('north america', 'canada', 'vancouver'),
Dynamic links in an include file
I am working on a small piece of code that counts records from a database and displays the result to the user. Everything works fine, except I am running into difficulties with dynamic links.The code
socket communication between c++/java and sending image
hi, i have a class in c++ called win32_sockserver which creates socket to java. i am trying to send image c++ to java and using the most basic method. i am sending image's rgb values as a string. But
Removing Title From database problem
Hi again ! i am having an issue with updating database. When i update any price of a title it remove the title from database please can somebody help me what i am missing in my code. here it is:Code:
MS are the best!!!
Visit http://www.microsoft.com/australia/windows/default.aspx?h=watch-a-demo and click the massive 'Watch a demo' banner.This, on the day the OS was released. They can't even get a website functioning
Creating a db with a query
Hello everyone.I'm having troubles creating a db with a query.I'm reading a book called PHP Bibles from Tim Converse I get this errorFatal error: Call to undefined function mysql_create_db() in
Class not found error
I am getting Class 'index' not found in Eval function://write config $path = dirname(__FILE__).DS.'..'.DS.'paymentclass'; if ( $model->payment_class ) { if
PHP/Database issue
My friend is helping me make a database where you go to a certain webpage of my site and the page will use code to pull information from a database and display it on the page in a formatted way.Code:
[function.file]: failed to open stream: No such file or directory
Okay I wrote this little script to upload a csv file that is located on my webhosts server to a mysql database. Something is wrong because I am getting the following error:Warning:
keeps going back to index.html ???????
ok so i started making my site using mostly.html files now i have added a fair chunk of php. My index,html file had to be renamed to index.php because i am using a include function, I got told that if