this is my code.the part of searching my database is done.the other part which is searching to citeseer encounter small problems.can u fix it?
<?php
$connection = mysql_connect('localhost','','') or die("Could not connect to MySQL " .mysql_error() );
$selection = mysql_select_db("db_cosrep") or die("Unable to select database. " .mysql_error());
$submit = $_POST["submit"];
$q = $_POST["q"];
if($submit == "Search >>")
{
$choice1=$_POST["choice1"];
if($choice1=="cosrep")
{
if(isset($_POST["q"]))
{
// create the query
$sql = "SELECT * FROM php_directory WHERE title LIKE '%$q%' ";
// execute query
$result = mysql_query($sql) or die("SQL select statement failed");
// retrieves a row data and returns it as an associative array
while ($row=mysql_fetch_array($result))
{
// display direct from array
echo "<table><tr width=100%>";
echo "<td width=80%><a target='_blank' href=$row[url1]><u>$row[title]</u></a></td><td width=20%>percentage</td>";
echo "</tr>";
echo "<tr>";
echo "<td width=80%>$row[abstract]</td><td width=20%>$row[publishon]</td></tr>";
echo "<tr>";
echo "<td width=80%>$row[url]</td><td width=20%></td>";
echo "</tr></table>";
echo "<hr>";
}
}
}
if($choice1=="cosrepNciteseer")
{
$self = $HTTP_GET_VARS['PHP_SELF'];
$q = str_replace(' ', '+', $_GET['q']);
echo readfile("http://citeseer.ist.psu.edu/cis?q=$q");
}
}
?>