I got this problem I don't get any errors,
After I create a session, and register $username you can click a hyperlink and you go to this page.
The session still exists on this page
but somehow the code isn't working, no matter what I do,only the $sitename and $username can be printed out ,so only these variables are available, but with a previous code these query's worked perfectly well, but I overwrited it...
Anyone???
Thanks a lot!
<?php
session_start();
?>
<head>
<?php
if ($username=="")
{
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=http://www.tools-and-design.com/siteframe1.htm\">";
}
?>
<title>Untitled</title>
<style type="text/css">
<!--
This would be unimportant.
-->
</style>
<?php
/ Connect to db, check login. /
$query = "SELECT username,mailing,address as 'adres',name,comment,category,sitename FROM information WHERE username = '$username'";
$result = mysql_query($query);
echo mysql_error();
while ($row = mysql_fetch_array($result)){
$datum = date("d-m-Y H:i");
$mailing = $row['mailing'];
$adres = $row['adres'];
$name = $row['name'];
$comment = $row['comment'];
$category = $row['category'];
$username = $row['username'];
$sitename = $row['sitename'];
echo "<center><h3>$sitename</h3><p><table border=\"1\" bordercolor=\"#483d8b\" width=\"200\"><tr><th><b><a href=\"form_z.php?<?=SID?>\">Ratings</a></b></th><th><b>$datum</b></th></tr><tr><td><b>URL:</b></td><td><b><a href=\"{$row['adres']}\">{$row['sitename']}</a></b></td></tr><tr><td><b>Name:</b></td><td><b>$name</b></td></tr><tr><td><b>Category:</b></td><td><b>$category</b></td></tr><tr><td><b>Description:</b></td><td><b>$comment</b></td></tr></table>";
//SELECT everything from the visitor counter and put rseults in a table.
$query2 = "SELECT * FROM tellen WHERE address ='$adres'";
$result2 = mysql_query($query2);
echo mysql_error();
while ($row = mysql_fetch_array($result2)){
$address = $row['address'];
$aantal = $row['aantal'];
$http_user_agent = $row['http_user_agent'];
$remote_addr = $row['remote_addr'];
if ($aantal=="")
{
$aantal = 1;
$entry_1 = "INSERT INTO tellen (http_user_agent, remote_addr, address, aantal) VALUES ('$HTTP_USER_AGENT', '$REMOTE_ADDR', '$address', '$aantal')";
$resultaat = mysql_query($entry_1);
echo mysql_error();
}
//SELECT ALL Statistics and put the result in a table
$status = "SELECT * FROM statistiek WHERE username ='$username'";
$resultaat = mysql_query($status);
while ($row = mysql_fetch_array($resultaat)){
$address = $row['address'];
$strengths = $row['strengths'];
$downers = $row['downers'];
$rate = $row['rate'];
$article = $row['article'];
echo "<table><tr><th>Strengths</th><th>Downers</th><th>Rate</th><th>Comments</th></tr><tr><td>{$row['strengths']}</td><td>{$row['downers']}</td><td>{$row['rate']}</td><td>{$row['article']}</td></tr></table>";
echo mysql_error();
}
}}
?>
</head>
<center><b>You are logged in as: <u><?php print ("$username");?></u></b></center><p>
..................
etc.