- Messages
- 3,819
- Reaction score
- 163
- Points
- 63
I need help with a script that displays my mysql table. I keep getting this error.
Here is the code:
Can you find out anything wrong with it?
PHP:
Parse error: syntax error, unexpected $end in /home/leafy/public_html/roster.php on line 31
Here is the code:
PHP:
<?php
$username="leafy_admin";
$password="removed";
$database="leafy_roster";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM leafy_clanemail";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<b><center>Night Assassins Clan Roster</center></b><br><br>";
$i=0;
while ($i < $num) {
$name=mysql_result($result,$i,"field1-name");
$email=mysql_result($result,$i,"field2-name");
$rank=mysql_result($result,$i,"field3-name");
echo "<b>$field1-name
$field2-name2</b><br>$field3-name<br>;
$i++;
}
?>
Can you find out anything wrong with it?
Last edited: