Jump to content
MakeWebGames

Recommended Posts

Posted

i have this the wcho from the $rank part am bit confused what quotes to change so it fits in with the rest please help me fix it i tried alot but no result

 

echo"

<!-- Begin Main Content -->

$ranks = mysql_query("SELECT username, display_pic, user_level, level FROM users WHERE user_level = 1 ORDER BY level DESC LIMIT 10");

$i = 1;

while ($rank = mysql_fetch_array($ranks)) {

echo $rank['display_pic']?'

<img src=' . $rank['display_pic'] . ' alt="Username:' . $rank['username'] . ' " title="Username:' . $rank['username'] . ' " width="40px" height="43px" onMouseOver="HandleMoveOn(\' '. $rank['username'] .' \')" onMouseOut="HandleMoveOff()">

':'

<img src="images/default.png" alt="Username:' . $rank['username'] . ' " title="Username:' . $rank['username'] . ' " width="40px" height="43px" onMouseOver="HandleMoveOn(\' '. $rank['username'] .' \')" onMouseOut="HandleMoveOff()">';

$i++;

}

<div id='stats'>

<div id='statstxt'>

We currently have $online Mafia online out of $membs Mafias today $today joined!

</div>

<div id='regbtn'>

<a href='register.php'><img src='images/register_but.png'></a>

</div>

";

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/....../public_html/....../authenticate.php

Posted (edited)

try

 

$ranks = $db->query("SELECT username, display_pic, user_level, level FROM users WHERE user_level = 1 ORDER BY level DESC LIMIT 10");
$i = 1;
while ($rank = mysql_fetch_array($ranks)) {
echo '

<img src="' . $rank['display_pic'] . '" alt="Username:' . $rank['username'] . ' " title="Username:' . $rank['username'] . ' " width="40px" height="43px" onMouseOver="HandleMoveOn(\' '. $rank['username'] .' \')" onMouseOut="HandleMoveOff()">

<img src="images/default.png" alt="Username:' . $rank['username'] . ' " title="Username:' . $rank['username'] . ' " width="40px" height="43px" onMouseOver="HandleMoveOn(\' '. $rank['username'] .' \')" onMouseOut="HandleMoveOff()">';

$i++;
}
echo"
<div id='stats'>

<div id='statstxt'>
We currently have $online Mafia online out of $membs Mafias today $today joined!

</div>

<div id='regbtn'>

<a href='register.php'><img src='images/register_but.png'></a>

</div>";

}
Edited by illusions

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...