Please help with this code

M

Mr Ryerson

This code is in the config.pl file

$config{'verifiedmembersfile'} = 'verifiedmembers.txt';
$config{'verifiedmember_html'} = '
bgcolor="f3f3f3" style="border-bottom: 2px solid gray;">
face="Tahoma" size="2">Verified PayPal Seller
$config{'paypal1'} . '"
';


my %verifiedmembers_data = ();


open (DAT, $config{'basepath'}.$config{'verifiedmembersfile'} ) ||
die("Could not open file " .
$config{'basepath'}.$config{'verifiedmembersfile'} );


while () {


chomp;


$verifiedmembers_data{lc($_)} = 1;


}


close DAT;

$verifiedmembers_data{'mytest'} = 123;


$config{'verifiedmembers_data'} = \%verifiedmembers_data;


#########################
#And this is in my auction.pl file


my $mytitle;
if ($feat_yt eq "YES"){


print "
BGCOLOR=\"$config{'boldbackground'}\">";


}


else {
print "
BGCOLOR=\"$itemrowcolor\">";

}


if ($feat_bf eq "YES") {
$mytitle = "$title";

}


else {
$mytitle = "$title";


}


my $my_verifiedmember_html;
if
(exists(${$config{'verifiedmembers_data'}}{lc($sel leralias)}))
{

$my_verifiedmember_html =
$config{'verifiedmember_html'};



}


print
"
$filler$imagedisp";
print "$config{'displistfont'}
HREF=\"$ENV{'SCRIPT_NAME'}?category=$form{'category '}&item=$file
\" >$grabberpic $mytitle$my_verifiedmember_html";
print
"$#bids$config{'currencytype'}$bid$timerem
ai n\n";


}
}


What I need is a peice of code I can place on a particular page where
there is nothing and if they are not verified a peice of text I can
add that says this seller is not verified please help
 
T

Tad McClellan

Mr Ryerson said:
This code is in the config.pl file

$config{'verifiedmembersfile'} = 'verifiedmembers.txt';
$config{'verifiedmember_html'} = '
bgcolor="f3f3f3" style="border-bottom: 2px solid gray;">
face="Tahoma" size="2">Verified PayPal Seller
$config{'paypal1'} . '"
';


That is not Perl code. It does not compile.

Please copy/paste code rather than try to retype it.

while () {


chomp;


What is being chomp()ed there?

The code you posted does not put anything into the $_ variable.

#And this is in my auction.pl file

if ($feat_bf eq "YES") {
$mytitle = "$title";

}


else {
$mytitle = "$title";


}


You can replace all of that code with just this:

$mytitle = $title;

so why the if/else?

You should indent the body of your code blocks to help reveal
the structure of your program.

You should not quote a lone variable.

perldoc -q vars

What’s wrong with always quoting "$vars"?


if
(exists(${$config{'verifiedmembers_data'}}{lc($sel leralias)}))


That is not Perl code either. It does not compile.

Please copy/paste code rather than try to retype it.

What I need is a peice of code I can place on a particular page where


You cannot place Perl code "on a particular page", so nobody except
you knows what you are asking for.

please help


Consider hiring a programmer to do the programming that you need done.
 
B

Brian McCauley

over in separate posts to several newsgroups...

[ a badly worded question ]

Please don't spam,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,588
Members
45,093
Latest member
Vinaykumarnevatia00

Latest Threads

Top