Code: Select all
<?php
$dbconn = mysql_connect("infowolf", "root", "");
$result = mysql_select_db("products", $dbconn);
if ( $result == false )
{
echo mysql_error();
echo "<head><title>There was a problem connecting.</title></head>";
} else {
echo "<head><title>Connected to ProductIndex on infowolf.no-ip.com</title></head>";
}
if ($submitted) {
$sql = "INSERT INTO ProductIndex VALUES('$e_date', '$auction_id', '$relist', '$stock_id', '$shelf_id', '$emp_id', '$pname', '$pdesc', '$pnotes', '$c_price', '$taxable', '$weight', '$listed', '$photo', '$datesold', '$highbid', '$sentinvoice', '$datesent', '$buyer')";
$result = mysql_query( $sql ) or die (mysql_error());
echo "Thank you. The information you entered is as shown below.\n";
$sql ="SELECT * FROM ProductIndex WHERE auction_id=$auction_id";
$result = mysql_query( $sql ) or die (mysql_error());
$myrow = mysql_fetch_array( $result );
}
?>
<html>
<body bgcolor="#FFFFFF" link="#000080" vlink="#000080" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" FONT="FF5500">
&nbsp;
<center><table CELLSPACING=0 CELLPADDING=0 WIDTH="650" >
<tr>
<td WIDTH="650">
<table CELLSPACING=0 CELLPADDING=0 WIDTH="650" HEIGHT="75" >
<tr>
<td VALIGN=TOP WIDTH="650" HEIGHT="75"><img SRC="topbar.gif" height=75 width=650></td>
</tr>
</table>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="650" HEIGHT="22" >
<tr>
<td VALIGN=TOP WIDTH="650" HEIGHT="22" BACKGROUND="menubg.gif">&nbsp; <b><font color="#000000">Functions:</font>
<font color="#000000"><a href="">Home</a></font>&nbsp; |&nbsp; <font color="#000000"><a href="pentry.html">Product
Entry</a></font>&nbsp; |&nbsp; <font color="#000000"><a href="">Services</a></font>
|&nbsp; <font color="#000000"><a href="">Search</a></font>&nbsp; |
<font color="#000000"><a href="">Contact
Me</a></font>&nbsp; |&nbsp; <font color="#000000"><a href="">Help?</a></font></b></td>
</tr>
</table>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="650" HEIGHT="15" >
<tr>
<td VALIGN=TOP WIDTH="650" HEIGHT="15"><img SRC="bar.gif" height=15 width=650></td>
</tr>
</table>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="650" >
<tr>
<td VALIGN=TOP WIDTH="650" BACKGROUND="mainbg.gif">
<table BORDER=0 WIDTH="648" >
<tr>
<td width=150>&nbsp;&nbsp;Date Entered:</td>
<td width=498><? echo $myrowї"e_date"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Auction ID:</td>
<td width=498><? echo $myrowї"auction_id"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Relisted?:</td>
<td width=498><? echo $myrowї"relist"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Stock & Shelf ID:</td>
<td width=498><? echo $myrowї"stock_id"] ?>&nbsp;&nbsp;&nbsp;&nbsp;<? echo $myrowї"shelf_id"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Employee ID:</td>
<td width=498><? echo $myrowї"emp_id"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Product Name:</td>
<td width=498><TEXTAREA NAME=pname ROWS=2 COLS=40 VALUE="<? echo $myrowї"pname"] ?>"></TEXTAREA></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Product Description:</td>
<td width=498><TEXTAREA NAME=pdesc ROWS=4 COLS=40 VALUE="<? echo $myrowї"pdesc"] ?>"></TEXTAREA></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Product Notes:</td>
<td width=498><TEXTAREA NAME=pnotes ROWS=4 COLS=40 VALUE="<? echo $myrowї"pnotes"] ?>"></TEXTAREA></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Current Price:</td>
<td width=498><? echo $myrowї"c_price"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Taxable?:</td>
<td width=498><? echo $myrowї"taxable"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Weight(lbs):</td>
<td width=498><? echo $myrowї"weight"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Listed?:</td>
<td width=498><? echo $myrowї"listed"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Photo:</td>
<td width=498><A HREF="<? echo $myrowї"photo"] ?>"><? echo $myrowї"photo"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Date Sold:</td>
<td width=498><? echo $myrowї"datesold"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;High Bid:</td>
<td width=498><? echo $myrowї"highbid"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Sent Invoice?:
<br>&nbsp;&nbsp;Date Sent:</td>
<td width=498><? echo $myrowї"sentinvoice"] ?> &nbsp;-&nbsp;if yes,
<br><? echo $myrowї"datesent"] ?></td>
</tr>
<tr>
<td width=150>&nbsp;&nbsp;Name of Buyer:</td>
<td width=498><? echo $myrowї"buyer"] ?></td>
</tr>
<tr>
<td width=150><P>&nbsp;<P>&nbsp;<P>&nbsp;<P>&nbsp;</td>
<td width=498><P>&nbsp;<P>&nbsp;<P>&nbsp;<P>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
<table CELLSPACING=0 CELLPADDING=0 WIDTH="650" HEIGHT="15" >
<tr>
<td VALIGN=TOP WIDTH="650" HEIGHT="15"><img SRC="bar.gif" height=15 width=650></td>
</tr>
</table>
</td>
</tr>
</table></center>
</body>
</html>