Php if else problem

09/07/2012 19:16 kaderebak#1
Hi all

My problem

Query

PHP Code:
$login mssql_query("SELECT login= case when login_time >= logout_time then 1 when login_time < logout_time then 0 end
          from [Telecaster].dbo.[Character] with (nolock)where name = '
$post1'");
          
$login1 mssql_fetch_assoc($login);      
          
$sonuc $Login1['login']; 
İf and else

PHP Code:
if ($sonuc 1) {
           echo 
'<font color="red">You can not add the item as the avatar is online!</font>';
           exit();            
        } else { 
My problem

whatever the outcome , error Message You can not add the item as the avatar is online!


[Only registered and activated users can see links. Click Here To Register...]

$lpost1 = Chracter name

Thanks
09/07/2012 23:52 ci4lblFmPW#2
PHP differentiates upper case letters and lower case letters in variable names, you'll have to change the upper case 'L' of '$Login1' to a lower case 'L'.

Quote:
$sonuc = $Login1['login'];
->
Quote:
$sonuc = $login1['login'];
You will also have to use the correct comparison operator for variables, which is '==', not '='.

Quote:
if ($sonuc = 1)
->
Quote:
if ($sonuc == 1)
Greez,

Ciel
09/08/2012 05:23 kaderebak#3
Thanks so mach
09/10/2012 06:52 q8wars#4
its this php forums?

I am so sorry, I thought that this was rappelz private server
09/10/2012 14:54 Tofrum#5
Yes its rappelz private server
And guess what:
NO ONE GIVES A FUCK

There is no problem in helping others
09/10/2012 22:01 ci4lblFmPW#6
Well, kadebarak's problem was concerning a php issue related to Rappelz, hence it is, at least partially, belonging into this section.

Greetz,

Ciel