> -----Original Message-----
> From: Mark Colvin [mailto:[EMAIL PROTECTED]]
> Sent: 20 June 2002 16:48
>
> I have the following .php script and .inc file which doesn't work:
Advertising
> ===== .inc file =====
>
> <?PHP
> class Sessions
> {
>
> function Check_Session()
>
> session_start();
> if (!session_is_registered("SESSION"))
> {
> header("Location: http://???.???.??.?/index.php?logintext=Please
> login.");
> exit();
> }
>
> }
> Parse error: parse error, expecting `'{'' in
> /var/www/html/includefiles/session_functions.inc on line 7
Quite right. The body of a function needs to be enclosed in { }, so PHP is
expecting a { immediately after "function Check_Session()".
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php