I written the following code to search my DB. But the problem is I don't want to display this result. But by this result I am intersted to get the original result. That means how to search the DB again and again by a search result?? Is it possible??
Code: Select all
<?php
// Connect DB
include_once '../config/connection.php';
// Retrieve the SearchString
$q = mysql_real_escape_string($_POST["downline"]);
$newq = strtoupper($q);
//Run the search query
$searchQuery = mysql_query("SELECT * FROM `levelchart` WHERE UPPER(`userid`) LIKE
'%$newq%' ORDER BY `userid` DESC LIMIT 10");
while ($row =
mysql_fetch_assoc($searchQuery))
{
echo "<b>";
echo stripslashes($row["userid"]);
echo "</b><br />Name : ";
echo stripslashes($row['name']);
print "<br/>";
}
?>
<h4>LEVEL - 1</h4>
<?php
$search = mysql_query("SELECT * FROM `levelchart` WHERE UPPER(`intid`) LIKE
'%$newq%' ORDER BY `level` DESC LIMIT 10");
while ($row =
mysql_fetch_assoc($search))
{
echo "<b><br />User ID : ";
echo "</b>";
echo stripslashes($row["userid"]);
print ","." ";
echo "<b>Name : ";
echo "</b>";
echo stripslashes($row['name']);
$level1 = stripslashes($row["userid"]);
}
?>
[b]<h4>LEVEL - 2</h4>[/b]
<?php
(I don't know how to do)
?>but want to search again for the same.
Thanks in advance.
-----
s.dot - Please use [ php ] and [ /php ] tags when posting PHP code.