cwarn23 387 Occupation: Genius Team Colleague Featured Poster
if ($s>=1) {
  $prevs=($s-$limit);
  print '&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?s=$prevs&q=$var">&lt;&lt; Prev 10</a>&nbsp&nbsp;';
  }

// calculate number of pages needing links
  $pages=intval($numrows/$limit);

// $pages now contains int of pages needed unless there is a remainder from division

  if ($numrows%$limit) {
  // has remainder so add one page
  $pages++;
  }

// check to see if last page
  if (!((($s+$limit)/$limit)==$pages) && $pages!=1) {

  // not last page so give NEXT link
  $news=$s+$limit;

  echo '&nbsp;<a href="'.$_SERVER['PHP_SELF']."?s=$news&q=$var\">Next 10 &gt;&gt;</a>";
  }

$a = $s + ($limit) ;
  if ($a > $numrows) { $a = $numrows ; }
  $b = $s + 1 ;
  echo "<p>Showing results $b to $a of $numrows</p>";
  
?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I would suggest going into network connections (control panel) and the options in internet explorer to check if a program has setup a proxy server or vpn. Because some programs override your internet connection settings so you connect through a malicious server.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

My windows is Vista Ultimate.

That is probably why. Microsoft nolonger supports windows Vista and as far as I'm aware Microsoft never did support Windows Vista. So upgrade to Windows 7 or at the very least download linux from your local internet hub. WindowsVista==WindowsME.
For all we know Internet Explorer might not be compatible with Windows Vista.

jholland1964 commented: 100% Inaccurate information. Poster needs to check his facts -2
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Sounds like something has interfered with the boot sector. Perhaps you should insert your windows installation disk and do a repair. If you don't have a windows installation disk then buy one. If you can't afford it and want a harder alternative then download the ubuntu disk (about 1GB) and run ubuntu from the cd to browse the system for any malicious files.
So as I said before if you insert your windows installation disk you will get an array of options. From those options choose to repair the system and replace the system files. This will remove any system faults leaving only 3rd party software faults left. Enjoy.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Found a more accurate ratio to get pie.
355622/113198 = 3.14159260764
Pi value from above = 3.1415926
I'm such a genius.

Sriman_Laxmi commented: Ridiculous +0
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

It is the ratio of circles Circumference to the diameter or it can be the ratio of area of a circle to square of its radius....

You can practically calculate it for yourself by taking a string of known length and making a perfect circle.Then calculate the diameter of the circle.once you have it, you already know the length which is equal to the circumference.

Divide them both and you will have the value of pi=(Circumference/Diameter).

That makes me wonder what is the Circumference and diameter of a perfect circle. Two numbers you can divide to get the infinit length of pi accurately.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

When this formula matches your age or above then you are old.
bit=the bit rate of your first computer
age=the age when you got your first computer

int bit=32; //bit rate of first computer
age_of_computer=10; //years
age=40; //your age in years
for (int i=0;pow(2,i)<bit;i++) { }
if ((age-age_of_computer)>floor(bit/i)*5) {
//yay your old
}

At least that is how I think the code would go. Man I have too much time.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Why use hotmail when there is gmail with fewer ads. IMO gmail offers more for less. eg. you don't need to pay for gmail to send data to a email client where as hotmail has a monthly subscription for that. The only use for hotmail is for an msn account.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

And perhaps the best way of them all is url variables. Send a number to the database and pass that number through the url. The number could be just a sha1 hash of various data from the first page.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster
print "&nbsp;<a href='$_SERVER['PHP_SELF']?s=$prevs&q=$var'>&lt;&lt; Prev 10</a>&nbsp&nbsp;";

php5
unexpected t_variable:: $PHP_SELF does not exist in php5

I was a bit suspect about that variable. It is $PHP_SELF only when globals are enabled. However as of php5 globals have been depreciated. Also almost bob's script has a bug. You forgot the {} brackets around the array. But here is the corrected example (my version).

if ($s>=1) {
  $prevs=($s-$limit);
  print '&nbsp;<a href="'.$_SERVER['PHP_SELF'].'?s=$prevs&q=$var">&lt;&lt; Prev 10</a>&nbsp&nbsp;';
  }

Here is almost bobs script corrected.

print "&nbsp;<a href='{$_SERVER['PHP_SELF']}?s=$prevs&q=$var'>&lt;&lt; Prev 10</a>&nbsp&nbsp;";
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Besides from the very obvious as pointed above ($_SESSION) I would also suggest making sure you have cookies enabled. If cookies are disabled then sessions are disabled unless you put the session id in the url. The session id is stored in the variable/constant SID (upper case and no $ symbol) as corrected in the below script.

<?php
session_start();
$user="root";
$pass="";
$database="isp";

$use=$_POST['Username'];
$pas=$_POST['Password'];

mysql_connect(localhost,$user,$pass);
@mysql_select_db($database) or die("Unable to select database");

$query="SELECT * FROM userinfo WHERE email = '$use' AND telephone = '$pas'";
$row = mysql_fetch_assoc(mysql_query($query));
mysql_close();

if($row['email'] == $use && $row['telephone'] == $pas){
        $_SESSION['pas']=$pas;
	echo $_SESSION['pas'];
        //header("location:index-post.php?".SID);
	}
	else{
	header("location:LogIn.html");
	}

?>
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

hi, may i know the step u do it. My problem is how to save url on database...
thanks in advance.

To save into the database simply have a column named url and maybe a column named title then to insert use the following syntax.

mysql_query('INSERT INTO `movies` SET `title`="matrix reload", `url`="1647.flv"');

And to select it all you need to do is mysql_query('SELECT `url` FROM `movies` WHERE `title`="matrix reload"');
Very simple. Then of course you pass the url to a client side flv/movie player.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try each of the following

if ($s>=1) {
  $prevs=($s-$limit);
  print "&nbsp;<a href=\"$PHP_SELF?s=$prevs&q=$var\">&lt;&lt; Prev 10</a>&nbsp&nbsp;";
  }
if ($s>=1) {
  $prevs=($s-$limit);
  print "&nbsp;<a href=\\\"$PHP_SELF?s=$prevs&q=$var\\\">&lt;&lt; Prev 10</a>&nbsp&nbsp;";
  }

The difference? The first code box has the regular syntax for escaping a quote. However the second code box will output a single backslash before the quote. Also I noticed you didn't use the $PHP_SELF correctly. Perhaps the following?

if ($s>=1) {
  $prevs=($s-$limit);
  print '&nbsp;<a href="'.$PHP_SELF.'?s=$prevs&q=$var">&lt;&lt; Prev 10</a>&nbsp&nbsp;';
  }
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Thanks Martin.

$field and $value are both simple text strings.

I tried it as $a = $structure[$i] and got nothing back... print_r shows the entire array.

Try the following in the loop and if it dumps the array of two values then continue reading.

print_r($structure[$i]);

If that dumps an array that is not empty as you expect then your code may need to be as follows.

for($i=0; $i<$cntFields; $i++) {
$a = $structure[$i]['0'];
$b = $structure[$i]['1'];
echo "Field = $a / Value = $b<br>\n";
}

If that doesn't work then please post the result of print_r($structure);

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

Try the following:

$ext - is the var that reads the file extensions, such as exe and so on.

if (($ext == "jpg" || $ext=="gif" || $ext=="png") &&
($_FILES["uploaded_file"]["type"] == "image/jpeg" ||
$_FILES["uploaded_file"]["type"] == "image/gif" ||
$_FILES["uploaded_file"]["type"] == "image/png") &&
($_FILES["uploaded_file"]["size"] < 1000000)){

echo 'something';

}else(
echo 'none';
)

As you can see you had a few bugs.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I have just created a group and would like to know what sort of open source projects people would like to participate in so I can create the sourceforge page.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

In theory, good idea. In practice ... perhaps there is a reason there exists so much doubt about how large communities can work together to produce great development projects. haha. It seems like getting so many people on the same page and working together on a project in their spare time like this would be doable but be an organizing nightmare and be VERY time consuming. Still, I am wondering if there is any interest among the community? ...

Well don't you think it would be worth a try and see what happens? Perhaps the matter has got the attention of the wrong people. After all I only found out about this topic after a PM and I would be very interested in open source php projects.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi everybody,
I have been making a autoresponder bot but need information for the bot to learn from. I have just downloaded gutenberg and got all of its data into a database but need more data (preferably IT related). So does anybody know of a website like gutenberg but for modern science and technology? (about 5GB of data)

Thanks
cwarn23

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Neither Fedora nor Ubuntu work correctly on 64-bit computers; I mean the os itself is ok but they have problems with sound and playing movies. Vista works great right out of the box with no tweaking needed. So my vote is for Windows. Never used a MAC so don't know about it.

Wow, this thread dates back to the days of Windozer Vista. Now Vista is less popular then eXPee with the arrival of Windozer 7.0.0. Amazing to see how technology has progressed in less than 2 years.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster
<?php session_start(); ?>
<html>
<head />
<body>
<form action=login.php method=POST>
KeyIDentity: <input type=text name='user'>
Password: <input type=password name='password'>
<input type=submit value='Login'>
</form>

<?php

	if(isset($_POST) && !empty($_POST)){
		$con=mysql_connect("localhost", "root", "");
		mysql_select_db("register");
	        $user=mysql_real_escape_string($_POST['user']);
        	$password=mysql_real_escape_string($_POST['password']);		
		$get=mysql_query("SELECT * FROM users WHERE user='$user' and password='$password'");
		$result=mysql_result($get,0);
		
		mysql_close($con);

		if($result!=0) echo "Login Failed";
		else{
			echo "Login Successful";
			$_SESSION['user']=$user;
		}
	}	
	
?>
</body>
</html>
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

Hi, as a member of daniweb I have a question regarding the proposal of more forums. Would it be possible to have a tutorials forum where people can post tutorials where admin can sort through to transfer/edit/delete into the appropriate positions. Also another idea which I have brought up before is daniweb open source projects.

I believe both ideas would be popular and a tutorials forum would allow for an easier way to send tutorials for moderation with an easy way of communicating what needs changing before the tutorial can be submitted.

As for the daniweb open source projects, perhaps a way of attracting more developers along with the fun and joy of joining in. Then perhaps the community could come up with some ideas of what they would like developed in what languages and people in their spare time would be able to contribute to the code until a final result is made for download from daniweb. Just a thought.

So any comments on this?

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

Hi, if you have installed wamp, xampp or lamp then success you have done the first step. After that you may place your php files in the htdocs folder where you can view them at http://localhost/myphpfile.php
Next time RTFM please as google is your friend. I'm sure all of your answers will be in the installation guide for xampp.

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

What are your computer specs and what makes your computer special?
As for mine it is as follows:
RAM: 12GB
CPU: 3.2GHz 8 core i7 (Totaling to 51.2GHz single core single threaded)
Hard drive: 3TB
Graphix: 256MB
Operating System: Ubuntu 9.10 64-bit
This computer I use for brute force hashing and 3d rendering. So what are your computer specs and I would like to hear if someone has a better computer than myself.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Golly I see loads of glitches in the code. Well their not exactly bugs since their not syntax errors but things that should be changed. Perhaps try the following:

class DB {
   private $connection;
 
   public function __construct(){
      $this->connection = mysql_connect('localhost', 'user', 'pass', true) or die(mysql_error());
      mysql_select_db( 'dbname', $this->connection ) or die(mysql_error());
   }
 
   public function exec_query( $query ) {
      $v=mysql_query($query, $this->connection ) or die(mysql_error());
      return $v;
   }
}

As you can see I added 'true' into the connect function, added a return statement into the exec_query() function and added debugging information in several places. Below is an example for using your class in case it was miss-used.

$con=new DB();
$result=$con->exec_query('SELECT * FROM `table`');
while ($row=mysql_fetch_assoc($result)) {
//loop through result here
}
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just found the problem. It was a completely different unrelated piece of code that I accidentally deleted or that is commented. After uncommenting that code it all worked. But I will keep this thread open for soon bound to come problems in relation to this project.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi, me again. I don't mean to be a pain but I have another question. I'm trying to add an event handler to the code (Irrlicht game engine) but I can't seem to retrieve data from the main function to the event class. Below I have bool check = ((IGUICheckBox*)event.GUIEvent.Caller)->isChecked(); which doesn't report any errors but on the same token doesn't return any information. Does anybody know what I'm doing wrong as I have RTFM but still the manual isn't giving the full answer.

virtual bool OnEvent(const SEvent& event)
	{
		if (event.EventType == EET_GUI_EVENT)
		{
			s32 id = event.GUIEvent.Caller->getID();
			IGUIEnvironment* env = Context.device->getGUIEnvironment();
                        //attempt to get data from main function
			bool check = ((IGUICheckBox*)event.GUIEvent.Caller)->isChecked();
			switch(event.GUIEvent.EventType)
			{
			case EGET_BUTTON_CLICKED:
				switch(id)
				{
				case GUI_ID_SAVE_SETTINGS:
					{
						if (check==true) {
							std::cout << "true true true" << std::endl;
						}
					} return true;

Above is a section of the event handler I'm using and below is the checksnd variable being assigned in the main function. It is this checksnd variable that I need to retrieve in the event handler and appears as undefined in the event handler.

IGUICheckBox* checksnd = env->addCheckBox( true, rect<s32>(170,40,320,60));

Thanks.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Wow, thank you. That is exactly what I needed and yet my hours of googling didn't find that link. Thankyou very much. If I could give you double rep points I would.
*Solved*

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Hi, long time no C.
I have started using the Irrlicht gaming engine but have bumped into a problem which has been bugging me for the past 6 hours flat. I have a variable containing a std::string but it needs to be converted to a (const wchar_t *) string. Does anybody know how to make this string type conversion?
The code I'm using is as follows:

IGUIEditBox* player = env->addEditBox(settings["player_name"].c_str(), rect<s32>(170, 80, 320, 100));

//or alternative that could work without the variable
IGUIEditBox* player = env->addEditBox(L"test", rect<s32>(170, 80, 320, 100));

and in that code it is the settings["player_name"] variable which is the std::string when the input for addEditBox actually requires a (const wchar_t *) instead of std::string.

So anyone got any ideas?
Thanks.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

HI,
Thanks for the link. I have downloaded that set up. And installed it too. But while starting it, it gives me following error

Run Time Error '372':
Failed to load control 'UniTreeView' from UniBox210.ocx. Your version of UniBox210.ocx may be outdated. Make sure you are using the version of the control that was provided with your application.

Please let me know, how do I handle this.

OMG. You actually installed that before reading what I had to say. lol, That quote makes my day. In my previous post I asked if you were using that program and if not then as mentioned earlier where can I find this script/api. How hard is that. In otherwords, you send me a link like I sent you but with the correct download for what your using.

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

Is the following link the software you's are talking about because if it is then post the php/javascript/html/css code it has generated and I will guide you through the necessary corrections. But typically when dealing with programming it is best to stick to the code instead of a graphical interface.
http://download.cnet.com/AllWebMenus-Pro/3000-10247_4-10046707.html

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Please re-read the first sentence my previous post and answer.

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

I need this decoder cz I want to null a software.... I can't afford yearly license simply....

Well the yearly license is simply the only way. If I had the yearly license then I could write a free decoder but because it's commercial I'm not paying hundreds for something that's not going to achieve much.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

What about if you used some php regex to remove the duplicate code tags inside code tags before a new post is submitted? Or would that be a bit hard with vBulletin Dani?

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I think it's a bug which rarely occurs which needs to be fixed. That is the maximum amount of code that can go into a code tag. It seems code tags take a lot of cpu to process and large chuncks of code in code tags can cause fatal errors.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

I just reloaded it and now it seems to be displaying fine. It occured about 6:30PM when there was an error on line ~500 with memory leak of about 16****** bytes. I forget what the other numbers were.

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

Happy independence day everybody! The day we won the battle against aliens invading area51. I'm celebrating it and yet I'm not even American. What did you do this independence day.

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Below is a link to a rather popular topic which now has an unviewable page. From what I can see it exceeds php's memory limit of 16MB. I would strongly suggest increasing it to 48MB as 32MB is the php standard and without a limitation on the size of a single code/quote block, 48MB would be required at the present time.
http://www.daniweb.com/forums/thread90244-84.html

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

It seems that the query took so long and recurred so many times.

Not much you can do about that especially if its a large table.
But you could always try removing line 21 of my code to increase the speed ( $output=array() ).

cwarn23 387 Occupation: Genius Team Colleague Featured Poster

Try the following

<?php
// This is the Number 1 Member at the top of the Pyramid
 
$id = mysql_real_escape_string($_GET['cued']);
 
// Right here, I want to get the members who were sponsored by the Number 1 using his ID
 
$r = mysql_query("SELECT `id` FROM `users` WHERE `sponsor` = '$id'");
  	$output = array();
 	while ($row = mysql_fetch_array($r)) {
    $output[] = 'sponsor = "'.mysql_real_escape_string($row['id']).'" ';
	}
	$sponsored = implode(' or ', $output);
$re=mysql_query('SELECT * FROM `users`');
$count=mysql_num_rows($re);
// The $sponsored will look like this "sponsor = '2' or sponsor = '3' or sponsor = '4' and so on...
// I will now use $sponsored in my WHERE statement

while(mysql_num_rows($r)<$count){
$r = mysql_query("SELECT `id` FROM users WHERE ($sponsored)");
  	$output = array();
 	while ($row = mysql_fetch_array($result)) {
    $output[] = '`sponsor` = "'.mysql_real_escape_string($row['id']).'" ';
	}
	$sponsored = implode(' or ', $output);
 }
// Above loops through the 2nd, 3rd, 4th etc Query until all rows in the table are matched.
cwarn23 387 Occupation: Genius Team Colleague Featured Poster

772.1GB of pure SATA/USB storage

My computer is better then yours. haha - I'm 3 TB of storage raid 0.