Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 02:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Hilfe bei 'if' 'else'

Discussion on Hilfe bei 'if' 'else' within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
-Zhui-'s Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
Hilfe bei 'if' 'else'

Mein Problem ist, das ich immer "Keine" angezeigt bekomme, obwohl
ich mir mein Gold zu 10 gesetzt habe.

Mein Ziel ist es, wenn mein Gold 0 ist, wird "Keine" angezeigt, und wenn ich
1+ habe, wird das Gold ausgegeben.

PHP Code:
if($_SESSION['user_gold']>0){
        echo 
$_SESSION['user_gold']; 
    } else {
        echo 
"Keine";    
    } 
-Zhui- is offline  
Old 03/03/2014, 19:09   #2
 
elite*gold: 0
Join Date: Sep 2012
Posts: 4
Received Thanks: 2
session_start();

Am anfang deines PHP Dokumentes.
Greemt is offline  
Old 03/03/2014, 19:18   #3
 
-Zhui-'s Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
Quote:
Originally Posted by Greemt View Post
session_start();

Am anfang deines PHP Dokumentes.
Geht immer noch nicht, Verbindung ist da, andere Daten wie Account Name usw kann ich Empfangen.
-Zhui- is offline  
Old 03/03/2014, 19:19   #4
 
elite*gold: 0
Join Date: Jan 2012
Posts: 8
Received Thanks: 5
Dann lass dir doch mal $_SESSION mit var_dump($_SESSION); ausgeben und guck was da drinn steht. Vielleicht heißt dein Attribut ja anders?
Kexzwerg is offline  
Thanks
1 User
Old 03/03/2014, 19:28   #5
 
-Zhui-'s Avatar
 
elite*gold: 0
Join Date: May 2010
Posts: 895
Received Thanks: 167
Quote:
Originally Posted by Kexzwerg View Post
Dann lass dir doch mal $_SESSION mit var_dump($_SESSION); ausgeben und guck was da drinn steht. Vielleicht heißt dein Attribut ja anders?

Vielen dank, hab 'gold' nicht in MySQL SELECTed + nicht fertig eingefügt.

Hat sich erledigt.
-Zhui- is offline  
Reply




All times are GMT +1. The time now is 02:40.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.