parse error

admin

Administrator
Staff member
this is my source code and i got error message "parse error on line 33"
could you tell me what's wrong on the code?
thanks in advanced

<?php
$link=mysql_connect("localhost","mysql","localhost");
$db=mysql_select_db("software",$link);
$sql1="";
$sql2="";
$sql3="";
if ($jenis = "Program")
{
$sql1="select from barang where jenis_brg='AAA' and nama_brg LIKE '%$cari%'";
}
if ($jenis == "MP3")
{
$sql2="select from barang where jenis_brg='BBB' and nama_brg LIKE '%$cari%'";
}
if ($jenis == "Game")
{
$sql3="select from barang where jenis_brg='CCC' and nama_brg LIKE '%$cari%'";
}
?>

<body>
<table align="center" border=0>
<tr>
<td width="100%">Hasil</td>
</tr>
</table>
<table border=0>
<tr>
<td width="100%">&nbsp;
<?
$SearchResult="No";

for($i=1; $i=<3 ; $i++)
{
$query="query"."$i";
if ($$query == " ")
{
continue;
}
if (!($result=mysql_db_query($$query,$link))
{
echo "error";
}
if(($num_rows=mysql_num_rows($result)) != 0)
{
$SearchResult="Yes";
while ($row=mysql_fetch_array($result))
{
?>
<form method="post" action="additem.php">
<table border=0>
<tr>
<td width="50%">
<?php
echo $row["nama_brg"];
echo "<br>";
echo $row["harga_brg"];
echo "<br>";
?>
</td>
<td width="50%">
<input type=submit name="button" value=http://www.phpbuilder.com/board/archive/index.php/"beli">
</td>
<input type="hidden" name="selected_item" value="<?php echo $row["kode_brg"];?>">
</tr>
</table>
<?php
}
}
}

if ($SearchResult=="No")
{
echo "<p><b> Tidak Ketemu </b></p><hr>";
}
?>
<p>&nbsp</p>
</td>
</tr>
</table>
</body>




$result=mysql_query($$query,$link);
?>
<table border=0>
<?
while ($row=mysql_fetch_row($result))
{
echo "<tr><td>$row[2]</td></tr>";
}
?>
</table>
</body>
 
Back
Top