Problema syntax error!
Problema syntax error! postato il 04/12/2009 16:42:36 nel forum programmazione, open source e hosting
Salve ragazzi ^^
Allora ho rifinito la Gestione Staff,volevo però introdurre un piccolo particolare,ovvero che a fianco al nome del pg comparisse anche l'icona dello staff di appartenenza e ho utilizzato questo codice.
$MySql = 'SELECT * FROM Personaggio,Gilda WHERE Personaggio.IDGilda = Gilda.IDGilda AND Personaggio.Master > 0 ORDER BY Personaggio.Master, Personaggio.IDGilda, Personaggio.Nome';
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
echo '<form method=Post action="gst_master.php"><tr class=tChiaro>';
echo '<td><input type=hidden Name="Nome" value="'.htmlspecialchars($rs['Nome']).'"><img src="img/stemmi/'.$rs['URLImg'].'"> '.htmlspecialchars($rs['Nome']).''.switch ($rs["Master"]). {
case 1:
echo '<img src="img/Staff/Gamemaster.png">';
break;
case 2:
echo '<img src="img/Staff/Fato.png">';
break;
case 3:
echo '<img src="img/Staff/Founder.png">';
break;
case 4:
echo '<img src="img/Staff/Guide.png">';
break;
'</td>';
Mi restituisce questo errore!
Parse error: syntax error, unexpected T_SWITCH in /membri/khiiempires/gst_master.php on line 75
Vi prego di esseregentili e clementi T_T Help
Pagine → 1
04/12/2009 17:30:32
Ciao!
Ad occhio.. i punti prima e dopo "switch" non c'entrano nulla.
prova una cosa tipo così!
$MySql = 'SELECT * FROM Personaggio,Gilda WHERE Personaggio.IDGilda = Gilda.IDGilda AND Personaggio.Master > 0 ORDER BY Personaggio.Master, Personaggio.IDGilda, Personaggio.Nome';
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
echo '<form method=Post action="gst_master.php"><tr class=tChiaro>';
echo '<td><input type=hidden Name="Nome" value="'.htmlspecialchars($rs['Nome']).'"><img src="img/stemmi/'.$rs['URLImg'].'"> '.htmlspecialchars($rs['Nome']);
switch ($rs["Master"]) {
case 1:
echo '<img src="img/Staff/Gamemaster.png">';
break;
case 2:
echo '<img src="img/Staff/Fato.png">';
break;
case 3:
echo '<img src="img/Staff/Founder.png">';
break;
case 4:
echo '<img src="img/Staff/Guide.png">';
break;
}
echo '</td>';
}
04/12/2009 18:53:37
Ragazzi Grazie mille ora funziona! ^^ Grazie ancora!!!!!!
Discussione seguita da
Pagine → 1
Rispondi alla Discussione Segui Discussione Inoltra Discussione Forum Programmazione, Open Source e Hosting Elenco Forum
Articoli, Interviste e altre Risorse!
State of Survival ↗
AlterEgo ↗
Seconda Era ↗