I dont know what I do wrong..
But well this is how my code looks:
Code:
mysql_connect($place_db,$user_db,$passwd_db); //Connect to the MySQL database
@mysql_select_db($db) or die( "Unable to select database");
mysql_query($query);

$sql="SELECT * FROM members WHERE name='$name' and passwd='$passwd'";
$result=mysql_query($sql);
$count=mysql_num_rows($result);
if($count==1){
	$sql = mysql_query("SELECT * FROM members WHERE name='$name' and passwd='$passwd'") or die(mysql_error());  
	$db = mysql_fetch_array( $sql );
	proceed_login();
So, he connect to the Databse and before he calls the Function proceed_login() he makes the $db var a Array of MySQL Data.
So, well that works fine. I tested it and it works.
But now comes the weird part.
That function is declared earlyer in the code.
And here the code is:
Code:
<?
function proceed_login ( )
{
	if($db['active'] != "yes") {//This users account is NOT active... Die
		die("Account not active.");
	}
	$today = getdate();
	if($db['expdate'] <= $today[10]) // Check Unix DateStamp
It does not give any error.
So the $db string exist. The code comes there since I tested it..
So I thought Id check my mySQL database.
I did open phpMyAdmin.
Got to the right databse
and yea it was there.

So, why doesnt that work?
cheers,
Robin

Edit:
Ok, Im a moron, I forgot to make the $db variable Global or Parse it..
I fixed it -.-'