thanks millennium.
i got the script to run, but let me clarify what's wrong. instead of just listing the auctions that the buyer is active in, it lists all auctions that have been bid on, regardless of who the buyer is. anyone see the problem here, or does the script simply not do what i think it does?
here's another script i'm trying, problem with this one is that none of the active auctions seem to be being read. the table comes out blank, and i'm not getting any error messages.
use CGI::Carp qw(fatalsToBrowser);
use strict;
&oops('Your username is invalid.')if((length($form{alias})>20)or($form{ali as}=~/[_\W]/));
if($form{alias}&&$form{password}){
&oops('You must enter what option you would like to view.')unless($form{type}=~/^[1|2|3]$/);
&oops('Your password is invalid.')if((length($form{password})>20)or($form{ password}=~/[_\W]/));
$form{alias}=ucfirst(lc$form{alias});
&oops('Your username is invalid.')if(!-e"$config{basepath}reg/$form{alias}.dat");
my ($password,$email,$add1,$add2,$add3,@past_bids) = &read_reg_file($form{alias});
&oops('Your username is invalid.')unless($password);
&oops('Your password is invalid.')unless(lc$form{password}eq lc$password);
if($form{type}==1 or $form{type}==2){
print "<H2>Auctions In Which You ($form{alias}) Are The Seller<br></H2><TABLE BORDER=1 WIDTH=100\%><TR BGCOLOR=$config{'colortablehead'}><TD><B>Item</B></TD><TD><B>Current Price</B></TD><TD><B>High Bidder</B></TD><TD><B>Ends</B></TD></TR>";
my$rcount=0;
foreach(@past_bids){
$_=~/^(\w+)(\d{10})$/;
my($key,$file)=($1,$2);
next unless(-e"$config{basepath}$key/$file.dat");
my ($title, $reserve, $inc, $desc, $image, @bids) = &read_item_file($form{'category'},$form{'item'} );
next unless$title;
my@firstbid=split(/\[\]/,$bids[0]);
next unless($form{alias}eq$firstbid[0]);
$rcount++;
my($alias, $email, $bid, $time, $add1, $add2, $add3)=split(/\[\]/,$bids[$#bids]);
print"<tr height=40><td><a href=$ENV{'SCRIPT_NAME'}\?category=$form{'category '}\&item=$file>$title</a></td><td>\$$bid";
print"<br>(reserve not met)"if($bid<$reserve);
print"</td><td>";
if($#bids){print"$alias"}
else{print"-"}
my$closetime=localtime($file);
print"</td><td>$closetime</td></tr>";
}
if($rcount==0){print"<tr><td colspan=4><b>No Items To Display</td></tr>"}
print"</table>";
}
print"<br><br>"if$form{type}==1;
if($form{type}==1 or $form{type}==3){
print "<H2>Auctions In Which You ($form{alias}) Are A Bidder<br></H2><TABLE BORDER=1 WIDTH=100\%><TR BGCOLOR=$config{'colortablehead'}><TD><B>Item</B></TD><TD><B>Current Price</B></TD><TD><B>Your Last Bid</B></TD><TD><B>Your Status</B></TD><TD><B>Ends</B></TD></TR>";
my$rcount=0;
foreach(@past_bids){
$_=~/^(\w+)(\d{10})$/;
my($key,$file)=($1,$2);
next unless(-e"$config{basepath}$key/$file.dat");
my ($title, $reserve, $inc, $desc, $image, @bids) = &read_item_file($form{'category'},$form{'item'} );
next unless$title;
my@firstbid=split(/\[\]/,$bids[0]);
next unless($form{alias}ne$firstbid[0]);
$rcount++;
my@lastbid=split(/\[\]/,$bids[$#bids]);
print"<tr height=40><td><a href=$ENV{'SCRIPT_NAME'}\?category=$form{'category '}\&item=$file>$title</a></td><td>\$$lastbid[2]";
print"<br>(reserve not met)"if($lastbid[2]<$reserve);
print"</td><td>";
my$c=1;
for(my$i=$#bids;$i>0;$i--){
my($alias, $email, $bid, $time, $add1, $add2, $add3)=split(/\[\]/,$bids[$i]);
next if($form{alias}ne$alias);
print"\$$bid</td><td>";
if($lastbid[2]eq$bid){print"High Bid"}
else{print"Outbid"}
$c--;
last;
}
print"Unknown</td><td>Bid Retracted"if$c;
my$closetime=localtime($file);
print"</td><td>$closetime</td></tr>";
}
if($rcount==0){print"<tr><td colspan=5><b>No Items To Display</td></tr>"}
print"</table>";
}
}
else{
print"<FORM ACTION=$ENV{'SCRIPT_NAME'} METHOD=POST>
<H2>My Auctions and Bids</H2>
<TABLE WIDTH=100% BORDER=1 BGCOLOR=$config{'colortablebody'}>
<INPUT TYPE=HIDDEN NAME=action VALUE=yourauctions>
<TR><TD COLSPAN=2 VALIGN=TOP> This form will allow you to view your current bids and/or the items you are currently selling.
</TD></TR>
<TR><TD VALIGN=TOP><B>Your Username:<BR></B>Required for verification</TD><TD><INPUT NAME=alias TYPE=TEXT SIZE=30 MAXLENGTH=30>
<TR><TD VALIGN=TOP><B>Your Password:<BR></B>Required for verification</TD><TD><INPUT NAME=password TYPE=PASSWORD SIZE=30>
</TD></TR>
<tr><td colspan=2 valign=top>
<INPUT TYPE=HIDDEN NAME=type VALUE=3>
</td></tr>
</TABLE>
<CENTER><INPUT TYPE=SUBMIT VALUE=\"View Items\"></CENTER>";
}
1;
thanks for the help, guys.