Parašė MartynasČ· 2010 Kov. 19 10:03:14
#1
Sveiki, turiu gan kvailoką klausimą.
Štai turiu kodą :
<?php
$staff = mysql_query("SELECT * FROM ".$prefix."staff ORDER BY position DESC");
if(mysql_num_rows($staff) > 0)
{
while($n = mysql_fetch_array($staff))
{
if($n['position'] == 4)
{
$pos = 'Owner';
}
elseif($n['position'] == 3)
{
$pos = 'Co-Owner';
}
elseif($n['position'] == 2)
{
$pos = 'Administrator';
}
elseif($n['position'] == 1)
{
$pos = 'Moderator';
}
echo '<tr class="pad">
<td valign="middle" style="color: #663300;font-weight: bold;">
<img src="www.runescape.com/layout-'. $ln .'/img/main/home/'. htmlspecialchars($n['image']) .'.gif" alt=""> '. $pos .'
</td>
<td valign="middle" style="color: #663300;font-weight: bold;">'. htmlspecialchars($n['name']) .'</td>';
if(isset($_SESSION['admin']))
{
echo '<td align="right" valign="middle"><a href="acp/deletestaff.php?id='. htmlspecialchars($n['id']) .'">Delete</a></td>';
}
echo '</tr>';
}
}
else
{
echo '<tr class="pad">
<td valign="middle">
<img src="" alt="">
</td>
<td valign="middle">No Staff</td>
<td align="right" valign="middle"></td>
</tr>';
}
?>
Ir noriu, kad prie $pos = 'Owner'; būtų paveiksliukas su kodu
<img width="13" height="11" alt="" title="" src="http://www.runescape.com/forums/crown_gold.gif">
, bet man nesigauna.
O rašau taip :
$pos = <img width="13" height="11" alt="" title="" src="http://www.runescape.com/forums/crown_gold.gif">'Owner';
Ką netaip darau, nes kai taip padarau rašo :
Parse error: syntax error, unexpected '<' in /home/xevil/domains/mwforums.wu.lt/public_html/staff.php on line 117;)