CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
help with Deleting Lines

 



scuffed
stranger

Jul 7, 2001, 10:53 PM

Post #1 of 1 (346 views)
help with Deleting Lines Can't Post

could somebody please help me with this

sub delpost{
open(FILE,"guestbooks/$user/$user");
@POST=<FILE>;
while(<FILE>){
($email,$name,$icq,$aim,$site,$sign) = split(/\|\-\|/,$_);
}
close(FILE);

open(FILE,">guestbooks/$user/$user");
foreach $post(@POST){
chomp($post);
if ($form{'post'} ne $name){
print FILE $post ."\n";
}

}
close(FILE);
$rp = 4;
$rp2 = 1;
$hr = "";
$middle = "[$name] [$form{'post'}] has been successfully deleted [$post]";
&top;
&bot;
}

ok for some reason when i use that it doesn't read i correctly. it iwll read the &name as the Name of the radio button and not the value of it. Why?

i tried to make it print in the file all of the lines EXCEPT the line that has the Value $form{'postname'} eq $name

btu the $name comes out to be the name of the radio instad of the value its starting to irritate me


 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives