mwm
05-23-2006, 08:19 PM
I'm having employees search a database that has invoices in it.
The can search by vendor, vendor invoice, check or community. What I need is either the Idnum or the imageid to be a link so when click on it can be viewed. Any idea how this can be done dynamically?
Thanks
<html>
<body>
<head><link rel=stylesheet type=text/css href=css/default.css></head>
<h1>
<p align=center></p><p align=center></center></p></h1>
<?
include ("conn1.php");
session_start();
//echo "HI";
$mysql = ("SELECT idnum, ven,veninvoice,kirkcheck,community,imageid FROM corp
WHERE ven LIKE '%$ven%'
AND veninvoice LIKE '%$veninvoice%'
AND kirkcheck LIKE '%$kirkcheck%'
AND community LIKE '%$community%'AND idnum LIKE '%$idnum%'AND imageid LIKE
'%$imageid%'
");
$result= mysql_query($mysql) or die ("Can't connect");
echo "<th> Vendor</th>";
echo "<th>
Invoice</th>";
echo "<th> Check</th>";
echo "<th> Community</th>";
echo "<table border=\"0\">";
$j = true;
while ($row = mysql_fetch_row($result))
{
if($j)
$j= false;
else
$j=true;
echo "<tr>";
for ($i=0;$i<mysql_num_fields($result);$i++) {
if ($j) {
echo "<td bgcolor=\"#FFFFCC\">";
}
if (!$j) {
echo "<td bgcolor=\"#FFFFCC\">";
}
echo $row[$i];
echo "</td>";
}
}
echo "</table>";
?>
The can search by vendor, vendor invoice, check or community. What I need is either the Idnum or the imageid to be a link so when click on it can be viewed. Any idea how this can be done dynamically?
Thanks
<html>
<body>
<head><link rel=stylesheet type=text/css href=css/default.css></head>
<h1>
<p align=center></p><p align=center></center></p></h1>
<?
include ("conn1.php");
session_start();
//echo "HI";
$mysql = ("SELECT idnum, ven,veninvoice,kirkcheck,community,imageid FROM corp
WHERE ven LIKE '%$ven%'
AND veninvoice LIKE '%$veninvoice%'
AND kirkcheck LIKE '%$kirkcheck%'
AND community LIKE '%$community%'AND idnum LIKE '%$idnum%'AND imageid LIKE
'%$imageid%'
");
$result= mysql_query($mysql) or die ("Can't connect");
echo "<th> Vendor</th>";
echo "<th>
Invoice</th>";
echo "<th> Check</th>";
echo "<th> Community</th>";
echo "<table border=\"0\">";
$j = true;
while ($row = mysql_fetch_row($result))
{
if($j)
$j= false;
else
$j=true;
echo "<tr>";
for ($i=0;$i<mysql_num_fields($result);$i++) {
if ($j) {
echo "<td bgcolor=\"#FFFFCC\">";
}
if (!$j) {
echo "<td bgcolor=\"#FFFFCC\">";
}
echo $row[$i];
echo "</td>";
}
}
echo "</table>";
?>