<?php

//hack defence...

include ("inc/inc_connect.php");
$result=mysql_query("SELECT * FROM $userstable WHERE strName = '$strUsername'");
$num_rows = mysql_num_rows( $result );
while ( $a_row = mysql_fetch_object( $result ) )
{
    if ($password != $a_row->strPassword)
    {
        header("Location: index.php");
        exit;
    }
}

setcookie( "gfcookie[1]", $strUsername, time()+60*60*24*7*52 );
setcookie( "gfcookie[2]", $strEmail, time()+60*60*24*7*52 );
setcookie( "gfcookie[3]", $strAvatar, time()+60*60*24*7*52 );
// setcookie( "gfcookie[4]", $memSig, time()+60*60*24*7 );
setcookie( "gfcookie[5]", $intPosts, time()+60*60*24*7*52 );
setcookie( "gfcookie[6]", $strHomepage, time()+60*60*24*7*52 );
setcookie( "gfcookie[7]", $strIp, time()+60*60*24*7*52 );
setcookie( "gfcookie[8]", $ynShowOnline, time()+60*60*24*7*52 );
setcookie( "gfcookie[9]", $ynShowEmail, time()+60*60*24*7*52 );
setcookie( "gfcookie[10]", $strIcqNumber, time()+60*60*24*7*52 );
setcookie( "gfcookie[11]", $strMsnName, time()+60*60*24*7*52 );
setcookie( "gfcookie[12]", $strYahooId, time()+60*60*24*7*52 );
setcookie( "gfcookie[13]", $strLocation, time()+60*60*24*7*52 );
setcookie( "gfcookie[14]", $strForumComment, time()+60*60*24*7*52 );
setcookie( "gfcookie[15]", $strTimeOffset, time()+60*60*24*7*52 );

header("Location: index.php");
exit;
?>