Hallo folk :)
Ik heb een heel klein probleempje met mijn login script. Hij logt namelijk niet in als ik handmatig geen variable opgeef. Dit is mijn script:
	// Check if we submitted
	if($_SERVER['REQUEST_METHOD'] == 'POST')
	{
		// Check if important fields are filled in
		if(empty($_POST['login_username']))
		{
			define('Error', true);
			define('Errortype', 1);
		}
		elseif(empty($_POST['Password']))
		{
			define('Error', true);
			define('Errortype', 2);
		}		
		// If an error is defined, show them
		if(defined('Errortype'))
			echo '<div id="error">'.$txt['login_error_'.Errortype].'</div>';
		// Set sessions
		if(!defined('Error'))
		{
			global $config;
			$CheckPassRight = mysql_query("SELECT * FROM ".$config['database']['prefix']."members WHERE username='".$_POST['login_username']."' and password='".md5(sha1(md5(sha1($_POST['Password']))))."'") or die(mysql_error());
			$CheckPassRight2 = mysql_num_rows($CheckPassRight);
			$_SESSION['CatalystUser'] = $_POST['login_username'];
			header("Location: index.php");
			exit();			
		}
	}

Het rare is, ik heb dit script eerder gebruikt, toen werkte het wel. De waarde van "CheckPassRight2" is wel 1, maar hij zegt dat de variable niet ingesteld is, zelfs niet aan het begin. :o Iemand een idee? Alvast heel erg bedankt,

Prettig weekend
Robert

[size=xsmall]Toevoeging op 09/04/2011 15:59:57:[/size]

Magisch... nadat ik dit topic heb gepost doet hij het wel opeens. :o Nja, opgelost :)

Reageren