Another MySQL Syntax error!
Posted: Fri Jun 12, 2009 12:47 pm
Hello again! PHP technorati. I require your assistance in solving another syntax error problem.
Here is my code:
I keep getting syntax error '' line 1
Please enlighten me.
Thanks in advance,
Batoe
Here is my code:
Code: Select all
<?php
require '*****.php';
$query = "SELECT * FROM bs_mail_list WHERE bossID = $bossID";
$result = mysql_query($query) or die (mysql_error());
while($row = mysql_fetch_assoc($result))
{
$text.= '<span class="style4">1-'.$row['my_category_1'].'<P>';
$text.= '2-'.$row['my_category_2'].'<P>';
$text.= '3-'.$row['my_category_3'].'<P>';
$text.= '4-'.$row['my_category_4'].'<P>';
$text.= '5-'.$row['my_category_5'].'<P></span>';
}
echo $text;
mysql_close();
?>
[color=#0000FF]*****.php = <?php
// Connect to server and select databse.
mysql_connect("**********", "*****", "***********") or die(mysql_error());
mysql_select_db("*****") or die(mysql_error());[/color]
?>
Please enlighten me.
Thanks in advance,
Batoe