Try this code:
Code:
<table border="2" width="75%" cellpadding="3" cellspacing="3">
<tr>
<td align="center">signature</td>
<td align="center">dst_ip</td>
<td align="center">src_ip</td>
<td align="center">date</td>
</tr>
<?php
<?
$host = "localhost";
$user = "#*$!x";
$pass = "#*$!xx";
$dbname = "xxxxx";
$connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>");
mysql_select_db($dbname);
//Query that is being run
$query= "select * from signature where sig_name= '" . $_POST['IP'] . "'";
//this will try to spit out the previous sql query
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
//this is a line break before the spit output
while ($line = mysql_fetch_row($result) )
{
echo '<tr>';
echo '<td align="center">'.$line[0].'</td>';
echo '<td align="center">'.$line[1].'</td>';
echo '<td align="center">'.$line[2].'</td>';
echo '<td align="center">'.$line[3].'</td>';
echo '</tr>';
}
?>
</table>
Bookmarks