This is the original code that works fine
<?
require("Cart.php");
DBinfo();
Brand();
Root();
mysql_connect("$DBHost","$DBUser","$DBPass");
$old=date("z")-1;
mysql("$DBName","DELETE FROM Users WHERE Date < $old");
$result=mysql("$DBName","SELECT CartItemsID,Date FROM CartItems");
while ($row=mysql_fetch_row($result)) {
$CII=$row[0];
$CDa=$row[1];
$pieces=explode(":",$CDa);
$DCHK=$pieces[1];
if ($DCHK < $old) {
mysql("$DBName","DELETE FROM CartItems WHERE CartItemsID = '$CII'");
}
}
if ($UID != "") {
$result=mysql("$DBName","SELECT * FROM Users WHERE User='$UID'");
$num=mysql_num_rows($result);
if ($num == "0") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
}
if ($UID == "") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
commonHeader("$Company","Select a category");
$result=mysql("$DBName","SELECT * FROM Category ORDER BY Category");
fontFace("Arial","Select a category:
");
echo "<ul>";
while ($row = mysql_fetch_row($result)) {
$Cat=$row[0];
$CatID=$row[1];
fontFace("Arial","<li><a href='$Relative/items.php?CA=$CatID&UID=$UID'>$Cat</a></li>");
}
echo "</ul>";
commonFooter($Relative,$UID);
?>
The error at line 49 is:
Header("Location: $PHP_SELF?UID=$UID");
But the page looked plain of course so I added a table and some graphics (I want to use this to try and get some work)
so the whole code is this: sorry about the length
<table width="705" border="0">
<tr>
<td colspan="3"><div align="center"><img src="images/banner_new.gif" width="705" height="90"></div></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="233"><?
require("Cart.php");
DBinfo();
Brand();
Root();
mysql_connect("$DBHost","$DBUser","$DBPass");
$old=date("z")-1;
mysql("$DBName","DELETE FROM Users WHERE Date < $old");
$result=mysql("$DBName","SELECT CartItemsID,Date FROM CartItems");
while ($row=mysql_fetch_row($result)) {
$CII=$row[0];
$CDa=$row[1];
$pieces=explode(":",$CDa);
$DCHK=$pieces[1];
if ($DCHK < $old) {
mysql("$DBName","DELETE FROM CartItems WHERE CartItemsID = '$CII'");
}
}
if ($UID != "") {
$result=mysql("$DBName","SELECT * FROM Users WHERE User='$UID'");
$num=mysql_num_rows($result);
if ($num == "0") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
}
if ($UID == "") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
commonHeader("$Company","Select a category");
$result=mysql("$DBName","SELECT * FROM Category ORDER BY Category");
fontFace("Arial","Select a category:
");
echo "<ul>";
while ($row = mysql_fetch_row($result)) {
$Cat=$row[0];
$CatID=$row[1];
fontFace("Arial","<li><a href='$Relative/items.php?CA=$CatID&UID=$UID'>$Cat</a></li>");
}
echo "</ul>";
commonFooter($Relative,$UID);
?>
</td>
<td width="24"> </td>
<td width="440"><h1 align="center"><font face="Arial, Helvetica, sans-serif">Welcome</font></h1>
<p><font face="Arial, Helvetica, sans-serif">Welcome to The Virtual Kitchen,
your best source to see the programming capabiltities of CobyInteractive.
Use the demo site to:</font></p>
<ul>
<li><font face="Arial, Helvetica, sans-serif">Shop for Items</font></li>
<li><font face="Arial, Helvetica, sans-serif">Pay for Items in Real Time
Using Credit Cards</font></li>
<li><font face="Arial, Helvetica, sans-serif">Update your store</font></li>
<li><font face="Arial, Helvetica, sans-serif">Upload images to your store</font></li>
<li><font face="Arial, Helvetica, sans-serif">Manage the content of the
whole site</font></li>
<li><font face="Arial, Helvetica, sans-serif">Add a banner ad rotation
system</font></li>
</ul>
<p> </p>
<p><font color="#FF0000" face="Arial, Helvetica, sans-serif">(Ad Copy)</font><font face="Arial, Helvetica, sans-serif"> Here
you can browse our catalog for all your ingredient needs: rices, spices,
dried fruits, and more. We carry only the best cooking utensils as
well. From knives and forks to pots and pans, you'll never have to
frown if you cook with our hardware. Why go anywhere else? We have
all you need to make that special, gourmet meal.</font></p></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="3"><hr width="600" noshade></td>
</tr>
<tr>
<td colspan="3"><div align="right"><font size="1" face="Arial, Helvetica, sans-serif"><small>
<img src="images/vklogosm.jpg" width="73" height="79" align="right">© 2003
CobyInteractive
150 Fifth Avenue
New York, NY 14623
Phone: 1-718-832-1304</small></font></div></td>
</tr>
</table>
I checking the release notes, I think I have not set the
Header("Location: $PHP_SELF?UID=$UID");
corectly
Could I send you the release notes in word and you could possibly take a look?
thanx for all you help