Issue: Unable to fetch record (User_ID) which then needs to be passed over to new PHP page (information.php).
Error: When I place the mouse over the records, it displays: localhost/phptest/information.php?id=
Scriptpage.php (Problem is here):
Code: Select all
<?php
include('conn.php');
$strlen = strlen($_GET['content']);
$display_count = $_GET['count'];
$select = "select * from markets_info where User_ID like '%".$_GET['content']."%' OR Market_Name like '%".$_GET['content']."%'";
$res = mysql_query($select);
$rec_count = mysql_num_rows($res);
if($display_count)
{
echo "There are <font color='red' size='3'>".$rec_count."</font> matching records found. Click Search to view result.";
}
else
{
?>
<center>
<table class="sofT" cellspacing="0" border="1">
<tr>
<td colspan="10" class="helpHed" align="center">Search Result</td>
</tr>
<tr>
<td class='helpHed'>Market Name</td>
<td class='helpHed'>Days</td>
<td class='helpHed'>Time</td>
</tr>
<?php
if($rec_count > 0)
{
while($data=mysql_fetch_array($res))
{
echo "<tr>
<td><a href=information.php?id=$res[User_ID]>".$data['Market_Name']."</td>
<td>".$data['Days']."</td>
<td>".$data['Time']."</td>
</tr>";
}
}
else
echo '<td colspan="5" align="center"><FONT SIZE="2" COLOR="red">No records found</FONT></td>';
}
?>
</center>
Please help!!!