cwarn23 387 Occupation: Genius Team Colleague Featured Poster

The way people are going on about you'd think Steve Jobs was their mother and tables and mp3 players had never existed before the iPod and iPad. i'm not a fan of Apple only the iPod (nano because it's lasted 5 years and i got it cheap) but the company is bigger than one man and similar technology to that released by Apple would more than likely have been released eventualy through natural progression.

How ever Apply (and Steve Jobs) have played a massive part in the advancement of technology. it's not nice to here that anyone has died and should be good to see what Apple go on to do in the future.

Just remember when we're all flying around on hoverboards the idea came from Back to the future in the 80's !

No I invented the hoverboard. You see in the year 2015 Dani unleashes a program called skynet making machines able to think for themselves and code their own way out of problems. Then in the year 2017 this machine is exposed as a optional component on Folding@Home where skynet rapidly builds up a database and scans the internet to download and document all content in existence. At the end of the year 2019 the first humanoid realeased from Stanford university as a commercial product is up for sale and Dani buy's one and programs in the newly created skynet into this humanoid. October 2020 Dani goes on a birthday party leaving the humaniod home and …

ChrisHunter commented: Amazing reply ! +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I've just done the math and your power supply appears to be the right size. Also does the fan on your graphics card spin because that would indicate if power is going to the graphics.

Motherboard: 15W
CPU:         95W
RAM:          4W
SSD Drive:  2.5W
Graphics:   450W
CD-ROM:      25W

I also noticed the following:

I connect 4 pin mains to the board not 6 pins.

There are 6 pins for a reason. Perhaps you should find the correct cord or adaptor. That could be the source of the problem.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

In 23 minutes the title of this thread will be obsolete.

This thread is officially obsolete. Time to update your firmware and reboot from the behind. Those who use windows are fortunate enough to not get a blue window screen of death where as mac users crash their car due to loss of sight. lol :)

sergent commented: lol +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps what you would be better off doing is when you want to append to the array, simply create a new array with the new size in its definition, then add the data from the old array to the new array and delete the old array. After that you may then assign the new value at the end of the new array.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps you should check for loose connections on the monitor and on the cable connecting into the graphics card. If that doesn't work then download the ubuntu live cd then insert the ubuntu live cd and boot from the ubuntu live cd to see if it's a software or hardware falt. If the screen goes black when booting from the ubuntu live cd it means some hardware will need replacing however, if the ubuntu live cd loads fine then you will need to insert the windows installation cd and do a disk repair.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

By the sounds of it, it seems like you might need a larger power supply but perhaps you should add up the wattage figures first. I know off by hand that the cpu is 130 watts. And if the VGA is 400 watts then that leaves you with 70 watts to power the rest of the computer. Also lack of wattage may have damaged some components in the computer so you may need to check piece by piece for falts when an appropriate power supply is added. This can be done by for example taking out the graphics card and booting up to see if there are any bios sounds and same with graphics card in and repeat with each piece except the motherboard and at all times when testing keep at least one ram chip in.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

In 23 minutes the title of this thread will be obsolete.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Now that I think about it, on Steve's funeral site will they bury him with a copy of every piece of Apple's software? That would be neat.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Rest In Bits Steve,
Now that Steve is out of the way, there is nothing stopping Microsoft taking over Apple. ;)

pseudorandom21 commented: =D We would all love that ! +0
jingda commented: Nope, you are wrong:) +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you mean like the following:

foreach($_POST['urls'] as $url) {
foreach ($_POST['names'] as $name ) {

//insert code here

}}

However be sure that $_POST and $_POST are both arrays.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

<?php

define('SMALL', 0);
define('BIG',   1);

class ClientInfo {

	var $flag_dirs = array(SMALL => 'assets/flags/small', BIG => 'assets/flags/big'); 
	var $flag_ext  = 'png'; 

	function getctrybycode($code) {
		$countryArray = array();
		$input = "includes/countries.dat";
		$fd = fopen($input,"r") or die("Error: cannot open $input!");
		while ($buffer = fgets($fd,4096))
		{
			$buffer = preg_replace("/\n/","",$buffer);   //chomp()
			$pieces = explode(",",$buffer);
			$countryCode = $pieces[0]; $countryName = $pieces[1];
			$countryArray[$countryCode] = $countryName;
		}
		fclose($fd);
		return $countryArray[$code];
	}


	function getctrybyhost($hostname) {

		return($this->getctrybycode($this->getctrycodebyhost($hostname)));
	}

	function getctrycodebyhost($hostname) {
		return(substr(strrchr($hostname,'.'),1));
	}

	function MaskOtherIP($IP) {

		if($IP==getenv("REMOTE_ADDR"))
			    return($IP);

				 $IP=strtr($IP,"0123456789","##########");
				 return($IP);
	}

	function getClientIP() {
		$IP = getenv('REMOTE_ADDR');
		return $IP;
	}

	function getClientHostname()
	{
		$error = 0;
		$IP = $this->getClientIP();
		$hostname = gethostbyaddr($IP);

	   if(!strcmp($hostname,$IP)) $error = 1;		// if failure, gethostbyaddr() returns the IP
		if (!$error) //if no error
		{
			return $hostname;
		}			
		//else
		return "";
	}

	function getClientCountry()
	{
		$error = 0;
		$hostname = $this->getClientHostname();
		if (!strcmp($hostname,"")) $error = 1;
		if (!$error)
		{
			$country = $this->getctrybyhost($hostname);
			return $country;
		}
		//else
      return "";
	}

	function getClientFlag($size)
	{
		$error = 0;
		$hostname = $this->getClientHostname();
		if (!strcmp($hostname,"")) $error = 1;
		if (!$error)
		{
			$country_code = strtolower($this->getctrycodebyhost($hostname));
			$file_name = $this->flag_dirs[$size] . '/' . $country_code . '.' . $this->flag_ext;
			if (is_readable($file_name))
			{
				return $file_name;
			}
		}
		//else
      return "";
	}

	function getClientFlagHTML($size)
	{
		$error = 0;
		$flag = $this->getClientFlag($size);
		if (!strcmp($flag,"")) $error = 1;
		if (!$error)
		{
			return '<img src="' . $flag . '">';
		}
		//else
      return "";
	}
};
phoenix416 commented: Thanks! +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

cwarn23, you must be good at playing tricks. That dude must be lucky you're not the one he's playing game with.

Indeed :)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It executes a hidden task that del stores on the computer which a trained it consultant can use to speed up the computer so he gets paid more. And you would say "But I have discovered this hidden code it consultants use as I had a hidden webcam in the room while my techie was at my house/apartment. It was fun watching the techie just perform this one simple task to fix all the problems with my computer".

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

for someone who could write such a script, i guess he would be knowledgeable enough to know the implications

Unless he had a false knowledge. del could stand for dell computers ;)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What you could do is send him an email and tell your friend to type the following into start->run or on windows 7 the search box on the start menu.

del *

Maybe you could tell him that it will double his cpu and make is computer faster but will be interesting to see how that will work out.

PS
If he is using Linux then /dev/null is a great secure folder to save stuff to *cough* will delete files *cough*.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

OMG these bugs keep on coming. Did you hide any more for me to fix?

<?php session_start();
if (!isset($_SESSION['referer'])) { 
    $_SESSION['referer']='';
    }
$_SESSION['referer'].=(isset($_SERVER['HTTP_REFERER']))?($_SERVER['HTTP_REFERER']."\n"):'';
$my_web = $_SESSION['referer'];
?>

This time I tested it :)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Ow now I see. Another bug. Try this.

<?php session_start();
if (!isset($_SESSION['referer']) { 
    $_SESSION['referer']='';
    }
$_SESSION['referer'].=$_SERVER['HTTP_REFERER']."\n";
$my_web = $_SESSION['referer']
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Your script should be the following:

<?php session_start();
 $_SESSION["referer"] .= $_SERVER['HTTP_REFERER'];
 $my_web = $_SESSION["referer"]
?>

Also you will need to find another alternative to $_SERVER as it isn't always that accurate. The reason being is users can disable that information being sent.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

$_GET is to get a variable from the url or a form method="GET" request like the previous post suggests.
$_POST get's a method="POST" request and is designed so that people can't read this data without a special addon or script which many people do for hacking reasons.
$_REQUEST is both $_GET and $_POST combined into the same array so it is the same as the following:

$_REQUEST=array_merge($_POST,$_GET);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Wow when did this topic turn into an explosion in the middle of New York. This happens every time somebody asks what is the best programming language on any forum on any website anywhere on the internet. It's like people treat their favourite language like their personal adopted baby. I can't believe how people aren't open to the opinions to others and aren't able to vote on the facts that are presented. Seriously where above has somebody voted on a weather one of the facts presented are true or not instead of saying it must be false because theirs are true. All I can say is same on you for making a great topic turn into a disaster thread.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

But that's like saying you can only use the tools that were available 2,000 years ago when Jesus walked the earth to do today's work. Assembly may be the father of all computer languages but sure isn't the best one, or even the most efficient one to use today.

If it isn't the most efficient one then why does Intel program their chips using Assembly and Linux use Assembly to recognize the computers hardware along with C. Even Windows XP has a small amount of Assembly to recognize Bios in the boot sequence. If Linux can be written in entirely in Assembly and C then I don't see why everything else can't. So do you deny that Linux and Windows are efficient (not that Windows is anyway) or because they use Assembly they are both terribly slow.

PS
Now that I think about it, it could be because Linux uses more Assembly than windows which makes Linux faster :)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Please refer to the computer language family tree. It clearly shows Assembly is the ultimate language with no previous generation to it. It is like god/jesus of programming which gave birth to children/languages which gave birth to even more children/languages. So if you want true efficiency then use Assembly and not the mutant offspring. May not be pretty but it works.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I would have to say Assembly, C, Python and SQL. If you can learn those four languages completely and fluently than you can solve just about any computer software issue weather it's to do with servers or linux or windows software etc.

sergent commented: Assembly! +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

According to my extensive knowledge of math (below are the symbols at wikipedia) the two equations will yield two different results. The --> symbol is the same is the Assembly code "if xxxxxx then" where the xxxxxx is what is before the --> symbol. So by changing the if statement you are changing what the result will be which means there is no need to examine the rest.

http://en.wikipedia.org/wiki/List_of_mathematical_symbols

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also if your on linux (I like ubuntu) then there is gedit. It is in many ways like the linux version of Notepad++ and usually comes pre-installed. Also if you want an equivalent for a Mac, then dual boot your mac with windows and you can get the benefits of the dark side of the force. Or alternatively you could use the mac as target practice at the fire range and buy a windows computer. But however you go about it perhaps you should use Notepad++. The ultimate text editor.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

You may place before any html/browser output the following function.

<?php

header('Location: http://www.example.com/'); //redirects user
/*
no echo's print's or ?> before here and <?php starts at the
beginning of the file before here as shown so this may be
in an if statement to check if the user get's redirected.
*/
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

$price=number_format($price,2,'.',',');
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try adding this to your html form and your code should then work.

<input type="hidden" name="finish" value="true">
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I want to know if I am on the right track.

Hi,
From the code snippet you have sent it appears you are on the right track but just keep in mind that regex otherwise known as the preg_ functions take up a lot of cpu. So in that code snippet the only suggestion I would make is to replace the last preg_replace with a loop ("for loop" probably) that finds the entries and replaces the entries by appending to a new string as it comes across each character. But other than that great job. :)

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also not sure if this works when using the variable in a function(). Which is basicly what function.php is for. Would i need to add the variable into the function foo($variable)?

Yes that is exactly what you need to do. For example:

<?php $variable='test';
include('second.php');
foo($variable);
function foo($test) {
echo $test;
}
foo($variable);
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following.

Index.php

<?php
$variable='this is a test.';
include('function.php');

And Function.php

<?php echo $variable; ?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try this:

<?php session_start();
 
      if(isset($_GET['finish']))
      {
      	$_SESSION=array();
      }
      else
      {
         $_SESSION['number'] = $_GET['number'];
 
         if (!isset($_SESSION['count']))
         {
      	   $_SESSION['count'] = 0;
         }
         else
         {
      	   $_SESSION['count'] ++ ;
         }
         $counter = $_SESSION['count'];
 
 
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

<?php session_start();
      $_SESSION['number'] = $_GET['number'];
      if (!isset($_SESSION['count']))
      {
      	$_SESSION['count'] = 0;
      }
      else
      {
      	$_SESSION['count']++;
      }
$counter = $_SESSION['count'];

But be sure to delete cookies before testing so you have a fresh start and new sessions.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

To be honest, simply doing www.domainname.com/username/ would be much simpler.

I beg to differ and say it's just as simple to get a subdomain for the user as it is for a subdirectory. I just happened to come across this issue a couple of years ago and already know the answer provided you use cpanel. In cpanel delete all of the subdomains for the domain your going to use for this project then create a subdomain called '*' (without the quotes). So just a * is the subdomain. Then point the subdomain to a directory which will process all of the subdomains. In that directory you should have a brand new blank index.php ready to create. Now with that one subdomain, any subdomain you enter will point to that index.php file. All you need to do is find out what the subdomain is and fetch relative content from the database. To make things easier, php stores the domain information in $_SERVER; Or at least one of those $_SERVER variables. So using that variable you can substr() to your subdomain and find out from the database which user owns the subdomain and which content should be displayed for that subdomain.

So that's a brief overview of how it works and any questions just post away.

showman13 commented: This is EXACTLY the kind of response I was looking for... thank you +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

This error usually means the username and password specified are either invalid or have insufficient permissions to the database.

So perhaps try your regular cpanel details in the mysql_connect() function as that gives you full permissions associated to your cpanel account provided your using cpanel. If your not using cpanel then use the details your host has provided when setting up the hosting account although the password may have changed since depending on how much you have changed the settings. If however your using something like wampp or xampp then I would suggest using the root username and password.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

if (!is_file($template_file)) { $template_file = $this->get_default_template(); }
    // Look whats the current post
    if (is_object($GLOBALS['post'])) { $this->the_current_post = $GLOBALS['post']; }
    
    // Use the template
    ob_start();

Also don't forget that php is case sensitive.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Was reading the documentation and found your bug. Try the following as I have fully corrected your original problem.

session_start();
$username="thorby68@live.co.uk";
setcookie('sb_cookie', $username,  time()+10000, '/');
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps try renaming the cookie so that it only contains letters and numbers. I have created a debugger script so try the following:

file 1

session_start();
$username="thorby68@live.co.uk";
setcookie('sbcookie', $username,  time()+10000);

file 2

session_start();
if (isset($_COOKIE['sbcookie'])) {
if (!empty($_COOKIE['sbcookie'])) {
echo $_COOKIE['sbcookie'];
} else {
echo '<i>This cookie has been emptied or not transfered properly</i>';
}
} else {
echo '<i>This cookie does not exist as far as php can see</i>';
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well there are a few factors that could cause this problem. First correct your code as ApocDen mentioned. Then when viewing the pages, make sure it is in the same browser window (eg. different tabs) and be sure that cookies are enabled. If cookies are disabled then the script will not work. Also cookies do not transfer between different browsers. So if for example you opened file1 in Internet Explorer and file 2 in Firefox there is no way for the data to transfer since they are different browsers.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hmmm what is the { at the end of the $act=mysql_real_escape_string($act);

Indeed and did you use mysql_connect() before the mysql_real_escape_string() function? You need a mysql connection open before you are able to use mysql_real_escape_string().

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just noticed in your second script you have programmed it in a weird way which may be your problem. Here is the new code.

<?php session_start(); ?>
<html>
<head> <title> Blokmates Account Login </title>
<link rel="stylesheet" type="text/css" href="css/login.css"/> </head>
<body>
<center>
<?php include_once "header.php" // Adds the header. ?>


<?php

$sql = "SELECT * FROM `users` WHERE `id`='".$_SESSION['uid']."'";
$res = mysql_query($sql) or die(mysql_error());
$row = mysql_fetch_assoc($res);

if ($_SESSION['uid']) { //fix this if statement
    echo "Hey " . $row['username'] . "!";
} else {
header("Location: login.php");
}
?>


<?php include_once "footer.php" // Adds footer. ?>
</center>
</body>
</html>

Hope that helps.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

There is a bug in your code which is making sessions not initialize. The session_start() function should be placed on the first line of the page before any browser/html output. For example.

<?php session_start(); ?>
<html>
<head> <title> Blokmates Account Login </title> </head>
<body>
<link rel="stylesheet" type="text/css" href="css/login.css"/> 
<center>
<?php include_once "header.php" // Adds the header. ?>
<br>
<div id="form">
<?php
if ($_SESSION['uid']) {
    echo "You are already logged in. If you want to log out, please <a href=\"./logout.php\">click here</a>!\n";
} else {

    if (!$_POST['submit']) {
        echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\">\n";
        echo "<form method=\"post\" action=\"./login.php\">\n";
        echo "<tr><td>Username</td><td><input type=\"text\" name=\"username\"></td></tr>\n";
        echo "<tr><td>Password</td><td><input type=\"password\" name=\"password\"></td></tr>\n";
        echo "<tr><td colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"submit\" value=\"Login\"></td></tr>\n";
        echo "<tr><td colspan=\"2\" align=\"center\">Don't have an account? <a href=\"register.php\">Make one</a>. </td></tr>\n";
        echo "</form></table>\n";
    }else {
        $user = mss($_POST['username']);
        $pass = $_POST['password'];
        
            if($user && $pass){
                $sql = "SELECT id FROM `users` WHERE `username`='".$user."'";
                $res = mysql_query($sql) or die(mysql_error());
                if(mysql_num_rows($res) > 0){
                    $sql2 = "SELECT id FROM `users` WHERE `username`='".$user."' AND `password`='".md5($pass)."'";
                    $res2 = mysql_query($sql2) or die(mysql_error());
                    if(mysql_num_rows($res2) > 0){
                        $row = mysql_fetch_assoc($res2);
                        $_SESSION['uid'] = $row['id'];
                        
                        echo "<br>";
                        echo "Thank you for logging in, " . $user . "<br><br><a href=\"/account.php\">Proceed.</a>\n";
                    }else {
                        echo "Your username or password is incorrect.\n";
                    }
                }else {
                    echo "That account doesn't exist!\n";
                }
            }else {
                echo "You need a username AND a password, believe it or not.\n";
            }
    }

}

?>
</div> 


<?php include_once "footer.php" // Adds footer. ?>
</center>
</body>
</html>

and

<?php session_start(); ?>
<html>
<head> <title> Blokmates Account Login </title>
<link rel="stylesheet" type="text/css" href="css/login.css"/> …
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Well I'm not sure how exactly sessions are stored on the server but I do know that the server stores an Id array or string array containing the identification code for every machine currently using sessions with that server. This is so that different users have different data stored and the identification code tells the server to send which data to which person. But for this system to work the server needs to tell apart each of the users. There are two methods. The default method is cookies. So in this method a cookie is sent to each user with the cookie name by default PHPSESSID. This cookie contains the identification code for the session. However the session identification code can be placed into the url bar by the server so that if cookies are disabled then sessions will work provided the identification is in the url bar. Below is an example of how to do that although it looks ugly having that thing in the url.

<?php session_start();
$_SESSION['test']='test';
echo '<a href="test.php?'. SID .'">test</a>'; //All links would have SID

?>

Second page (test.php)
<? session start();
echo $_SESSION['test'];
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Again,

Many thanks, but unfortunately this did not work either.

I'm not sure if it would help, but I can attach the full files to give you a better hook on what's happening.

Regarding the cookie and the session, the idea is to create either a cookie or session, not both. If the user does not want to use cookies, or has disabled cookies in their browser, then I intend to create a session for the duration of their stay, otherwise I will create a cookie that will last for 61 days (we only expect user to return once in a calendar month).

Please let me know if it's ok to forward the files in their entirety.

Many thanks

The only problem with that system is that sessions use cookies for identification. So if cookies are disabled then sessions are disabled. So perhaps you should enable cookies then you will see your sessions working again.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Also make sure you have the latest version of apache as older versions of apache are not compatible with windozer 7

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Perhaps try the following and why do you have a cookie when you have sessions?

<?php
session_start();
include 'loginstatus.php';

if (loggedin())
{
header ("Location: ../Pages/home.htm");
}
else
{}

if (!isset($_POST['logggg']))
{
echo 'Please enter username and password';
}
else
{
$username=$_POST['username'];
$password=$_POST['password'];

if(isset ($_POST['rememberme']))
{
$rememberme=$_POST['rememberme'];
}
else
{
$rememberme="off";
}

if($username&&$password)
{
$login = mysql_query("SELECT * FROM user_register WHERE username ='$username'");
while ($row = mysql_fetch_assoc($login))
{
$db_password = $row['password'];
if($password==$db_password)
{
if($rememberme=='on')
{
setcookie('username', $username, time()+7200); 
echo "<script language='javascript'>";
echo "parent.location.reload(true)";
echo "</script>"; 
}
else
{
$_SESSION['username']=$username;
echo "<script language='javascript'>";
echo "parent.location.reload(true)";
echo "</script>"; 
//header("Location: ../pages/home.htm"); 
}
}
else
{
echo "incorrect username or password";
}
}
}
else
{
echo "you must enter a username or password";
}
} 
?>
<div align="center"><img src="../pics/pokerlogo.png" width="355" height="113"></div>
<form action="login.php" method="post">
<p align="center" class="style1">
<label>Username
<input type="text" name="username"/>
</label>
</p>
<p align="center" class="style1">
<label>Password
<input type="password" name="password"/>
</label>
</p>
<p align="center" class="style1">
<label>Remember me
<input type="checkbox" name="rememberme"/>
</label> 
</p>
<p align="center"> 
<input type="submit" name="logggg" value="submit" /> 
</p>
</form>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you have cookies enabled because with the method your using only cookie powered sessions will work. This is because php is unable to pass to the parent http header information and/or the SID in the url. So make sure you have cookies enabled in IE.
If however cookies are enabled in IE then try removing the session_write_close(); function from your code. Also it would be good if you could post your full script because I only have a vague idea of what the code looks like and believe should be something as follows.

<?php
session_start();
$_SESSION['sessionname']=$variable;
echo "<script language='javascript'>";
echo "parent.location.reload(true)";
echo "</script>";
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

foreach (glob("tpl/*") as $filename) {
    echo "<a href=\"$filename\">".basename($filename).'</a>';
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following:

<?php
if (isset($_GET['y'])) {
//do this
} elseif (isset($_GET['x'])) {
//do that
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Do you have a function named username() and a function named password()? Or is it you have variables named $username and $password? At the moment on line 68 and 69 &username = username() function and &password = password() function which I'm guessing do not exist. So try the following:

$stmt = $dbh->prepare("SELECT username, password FROM client WHERE username = :username AND password = :password");
          &stmt->bindParam(':username', $username, PDO::PARAM_STR);
          &stmt->bindParam(':password', $password, PDO::PARAM_STR, 40);