I would like to change the following code in order to get mysql search results on a form - not on a table - and also the numbers of records displayed.
How to do it ?
Thanks
That's my code
<html>
<head>
<title>Form</title>
</head>
<body>
<center>
<table border="1" cellpadding="5" cellspacing="0" bordercolor="#000000">
<tr>
<td width="100"><b>Relator</b></td>
<td width="70"><b>Nºproc</b></td>
<td width="150"><b>Data</b></td>
<td width="200"><b>Descritor</b></td>
<td width="150"><b>Texto</b></td>
</tr>
<tr>
<td>
<?php
MYSQL_CONNECT("", "", "") OR DIE("DB connection unavailable");
@mysql_select_db( "") or die( "Unable to select database");
?>
<?php
//error message (not found message)begins
$XX = "No Record Found, to search again please close this window";
//query details table begins
$query = mysql_query("SELECT * FROM ac2000 WHERE $metode LIKE '%$search%' LIMIT 0, 50");
while ($row = @mysql_fetch_array($query))
{
$variable1=$row["RELATOR"];
$variable2=$row["N_PROC_"];
$variable3=$row["DATA_JULG_"];
$variable4=$row["DESCRITOR"];
$variable5=$row["TEXTO"];
//table layout for results
print ("<tr>");
print ("<td>$variable1</td>");
print ("<td>$variable2</td>");
print ("<td>$variable3</td>");
print ("<td>$variable4</td>");
print ("<td>$variable5</td>");
print ("</tr>");
}
//below this is the function for no record!!
if (!$variable1)
{
print ("$XX");
}
//end
?>
</table>
</center>
</body>
How to do it ?
Thanks
That's my code
<html>
<head>
<title>Form</title>
</head>
<body>
<center>
<table border="1" cellpadding="5" cellspacing="0" bordercolor="#000000">
<tr>
<td width="100"><b>Relator</b></td>
<td width="70"><b>Nºproc</b></td>
<td width="150"><b>Data</b></td>
<td width="200"><b>Descritor</b></td>
<td width="150"><b>Texto</b></td>
</tr>
<tr>
<td>
<?php
MYSQL_CONNECT("", "", "") OR DIE("DB connection unavailable");
@mysql_select_db( "") or die( "Unable to select database");
?>
<?php
//error message (not found message)begins
$XX = "No Record Found, to search again please close this window";
//query details table begins
$query = mysql_query("SELECT * FROM ac2000 WHERE $metode LIKE '%$search%' LIMIT 0, 50");
while ($row = @mysql_fetch_array($query))
{
$variable1=$row["RELATOR"];
$variable2=$row["N_PROC_"];
$variable3=$row["DATA_JULG_"];
$variable4=$row["DESCRITOR"];
$variable5=$row["TEXTO"];
//table layout for results
print ("<tr>");
print ("<td>$variable1</td>");
print ("<td>$variable2</td>");
print ("<td>$variable3</td>");
print ("<td>$variable4</td>");
print ("<td>$variable5</td>");
print ("</tr>");
}
//below this is the function for no record!!
if (!$variable1)
{
print ("$XX");
}
//end
?>
</table>
</center>
</body>