This topic is locked

Novice problem events.php

8/28/2006 9:01:38 AM
PHPRunner General questions
B
bluestrikealpha author

Hi there,
I am just learning to set up a mysql site with PHPrunner 3.1 (downloaded the newest version today.

It still gives me an error

Parse error: parse error, unexpected T_RETURN in /var/www/html/include/events.php on line 45
line 45 says:
' return true if you like to proceed with login

' return false in other case
Could you help me here?
Thanks,
Dion

J
Jane 8/28/2006

Dion,
it seems that you forgot semicolon and made some mistakes in the event code.

Show me full event code and I'll help you to fix it.

B
bluestrikealpha author 8/28/2006

Hi again,
I just tried by putting slashes befor it ( //) and it passes on to the next error :

Fatal error: Call to undefined function mlang_message() in /var/www/html/include/commonfunctions.php on line 3143
What is this?
by the way here is the full events.php :
<?php
function LoginOnLoad()

{

//** Check if specific record exists ****

global $conn;

$strSQLExists = "select * from AnyTable where AnyColumn='AnyValue'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

// if record exists do something

}

else

{

// if dont exist do something else

}
//** Check if specific record exists ****

global $conn;

$strSQLExists = "select * from AnyTable where AnyColumn='AnyValue'";

$rsExists = db_query($strSQLExists,$conn);

$data=db_fetch_array($rsExists);

if($data)

{

// if record exists do something

}

else

{

// if dont exist do something else

}
}#
function BeforeLogin($username, $password)

{

//** Display a message on the Web page ****

echo "Your message here";
return true;
// return true if you like to proceed with login

// return false in other case
}#
?>
Can you do something with this?
Hi Jane,
this is the commfunctions line:
can't make chocolat with this as they say here in holland:
$data['name'] = $name;

if ($attributes)

{

$data['attributes'] = $attributes;

}

$this->data[] = $data;
thanks for looking at this
Dion

J
Jane 8/29/2006

answered in your personal email.