HTML Fehler bei Serverhomepage !

09/02/2011 22:06 Yoscha#16
Ach in der Tabelle soll eine Spalte itemshop heißen ? :D
Das ist dann völlig Falsch .. die DB account -> TABELLE itemshop und dann 4 Spalten.
( id, name, price, pic, group )
09/02/2011 22:08 NotEnoughForYou#17
Nein die Spalte soll Itemname, coins heißen so steht es im Script ... dann musst du $fetch->name $fetch->price etc machen
09/02/2011 22:10 Yoscha#18
Uhm ... das krieg ich voll nicht auf die Reihe irgendwie >,<
Ist das dir, oder jmd anderen Möglich das von eurem Standort aus zu erledigen ?
Wäre echt mega nett :(
09/02/2011 22:11 NotEnoughForYou#19
Klar ich änder es dir kurz ab

#EDIT
PHP Code:
<?php
session_start 
();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
    <head>
        <title>
            FBL-System
        </title>
        <meta http-equiv="content-type"
            content="text/html; charset=ISO-8859-1" />

        <style type="text/css" media="screen">
            <!--
body {
background-color: #f5c45b;
color: #000;
width: 350px:
}
.container {
background-color: #e5b346;
-moz-border-radius: 10px;
}
a {
color: #000;
}
            -->
        </style>
    </head>
    <body>
<?php

    
if($_SESSION['ID'] == "") {
        include(
'inc/login.php'); }
        else {
        
        
$coins $_SESSION['coins'];
        
echo 
"
<center>
Hey, " 
$_SESSION['id'] . " <br><br> Deine Coins: $coins  <a href=\"../index.php?section=psc\" target=\"_top\">Aufladen!</a>   <a href=\"logout.php\">Ausloggen</a><br><br>
<table border=\"0\">
<tr><th width=\"200\">Bild</th><th width=\"200\">Name</th><th width=\"200\">Preis</th><th width=\"200\">Kaufen</th></tr>
</table>"
;
    include(
'../server/dbsettings.php');
    
$db    "account";
    
mysql_connect($dbhost$dbuser$dbpw) OR
    die(
"ERROR: Connection failed. ".mysql_error());        
    
mysql_select_db($db) OR
    die(
"ERROR: DB allready open. ".mysql_error());
        
    
$section "SELECT * FROM itemshop";
        
$query mysql_query($section);
        
            echo 
"<table border=\"0\">";
                while(
$fetch mysql_fetch_object($query)) {
echo 
"<tr><th width=\"200\"><img src="images/items/'.$fetch->pic.'.gif "></th><th width=\"200\"><font color=\"black\">$fetch->name</font></th><th width=\"200\"><font color=\"black\">$fetch->price</font></th><th width=\"200\"><font color=\"black\"><a href=\"shopbuy.php?id=$fetch->id\">Kaufen!</a></font></th></tr>";
}
echo 
"</table></center><br>";
}
?>
</body>
</html>
#EDIT2 : kurz noch das FROM geändert und den vergesssenen Tag geschlossen
09/02/2011 22:12 Yoscha#20
Vielen, Vielen Dank !!! :):)

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\shop\shop.php on line 58


Komme nicht mal noch in den itemshop rein jetzt :/
( hab alles ersetzt )

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\shop\shop.php on line 58


Komme nicht mal noch in den itemshop rein jetzt :/
( hab alles ersetzt )

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\shop\shop.php on line 58


Komme nicht mal noch in den itemshop rein jetzt :/
( hab alles ersetzt )
09/02/2011 22:46 NotEnoughForYou#21
habe es geupdatet wegen dem tag zeig mal deine version vermutlich ist das die davor

#EDIT:
PHP Code:
<?php 
session_start 
(); 
?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
     "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html> 
    <head> 
        <title> 
            FBL-System 
        </title> 
        <meta http-equiv="content-type" 
            content="text/html; charset=ISO-8859-1" /> 

        <style type="text/css" media="screen"> 
            <!-- 
body { 
background-color: #f5c45b; 
color: #000; 
width: 350px: 

.container { 
background-color: #e5b346; 
-moz-border-radius: 10px; 

a { 
color: #000; 

            --> 
        </style> 
    </head> 
    <body> 
<?php 

    
if($_SESSION['ID'] == "") { 
        include(
'inc/login.php'); } 
        else { 
         
        
$coins $_SESSION['coins']; 
         
echo 

<center> 
Hey, " 
$_SESSION['id'] . " <br><br> Deine Coins: $coins  <a href=\"../index.php?section=psc\" target=\"_top\">Aufladen!</a>   <a href=\"logout.php\">Ausloggen</a><br><br> 
<table border=\"0\"> 
<tr><th width=\"200\">Bild</th><th width=\"200\">Name</th><th width=\"200\">Preis</th><th width=\"200\">Kaufen</th></tr> 
</table>"

    include(
'../server/dbsettings.php'); 
    
$db    "account"
    
mysql_connect($dbhost$dbuser$dbpw) OR 
    die(
"ERROR: Connection failed. ".mysql_error());         
    
mysql_select_db($db) OR 
    die(
"ERROR: DB allready open. ".mysql_error()); 
         
    
$section "SELECT * FROM itemshop"
        
$query mysql_query($section); 
         
            echo 
"<table border=\"0\">"
                while(
$fetch mysql_fetch_object($query)) { 
echo 
"<tr><th width=\"200\"><img src='images/items/'.$fetch->pic.'.gif'></th><th width=\"200\"><font color=\"black\">$fetch->name</font></th><th width=\"200\"><font color=\"black\">$fetch->price</font></th><th width=\"200\"><font color=\"black\"><a href=\"shopbuy.php?id=$fetch->id\">Kaufen!</a></font></th></tr>"

echo 
"</table></center><br>"

?> 
</body> 
</html>
kommt davon wenn man es kurz hier macht ^^ hatte " statt '
09/09/2011 08:46 JacK le chilla#22
hab ich glaub ich auch iwann mal erwähnt :D hab mal drübergeschaut jetzt müsste eig gehen:) ty