Re: [PHP] Please help can anyone figure whats wrong with this?

2003-06-25 Thread Steve Keller
At 6/25/2003 10:26 AM, Kevin Stone wrote:

> You're missing a starting bracket.
>
> You know this was WAY too easy to find.  What kind of editor are you using
> that would miss something this obvious?
A little indenting goes a long way...

--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Please help can anyone figure whats wrong with this?

2003-06-25 Thread Kevin Stone

- Original Message -
From: "Mark Clarkstone" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 10:10 AM
Subject: [PHP] Please help can anyone figure whats wrong with this?

> if (!$logusername)
> echo "
>
> 
>
> $sitename -- Login --- Error
> 
>
> 
>
> Please enter Your Username or Sign
> Up
> 
> 
>
> ";
> }

You're missing a starting bracket.

You know this was WAY too easy to find.  What kind of editor are you using
that would miss something this obvious?

On an unrelated note you can save yourself a lot of grief by separating your
logic and content.  In your case a page template with the look and feel of
the message page.

/** message_page.html  **/



 




/** index.php **/
if($login)
{
$message = "Please enter your Username or Sign Up.";
include("message_page.html");
}
else
{
$message = "Thank you for login in.";
include("message_page.html");
}

This is just a friendly suggestion.  I know most people don't like to be
preached to.  :)

HTH,
Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Please help can anyone figure whats wrong with this?

2003-06-25 Thread Mark Clarkstone




$sitename -- Login --- Error




Sorry but the Staff at $sitename are
currently configuring the members Area please return soon



";
}
else if ($allow =="yes")

if (!$action)
echo "



$sitename -- Login





Welcome to $sitename, Please Login
below 
Username:


Password:





Register

Forget
Password




";

if ($action="process_login") {
$line = file("data/$logusername.txt");
$password = $line[4];
$username = $line[0];

if (file_exists("data/$logusername.txt")) {
echo " ";
}
else {
echo "



$sitename -- Login --- Error




Username not in our database



";
}
if (!$logusername)
echo "



$sitename -- Login --- Error




Please enter Your Username or Sign
Up



";
}
else if (!$logpassword)
echo "



$sitename -- Login --- Error




No Password



";
else if (!$logpassword == $password) {
echo "



$sitename -- Login --- Error




Password does not match



";
}
else if ($logusername == $username && $logpassword == $password) {
setcookie ("$logusername", $value,time()+3600);
echo "



$sitename -- Logged in




You are now logged in 



";
}
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php