<%args> $id => "" <%init> my $dbh = $m->comp("/designobservercomp/database-connect.comp"); my ($sql, $sth, $i); # activate this: -Chris $id =~ s/\D//g; $sql = "SELECT id from articles WHERE oldid='$id'"; $sth = $dbh->prepare($sql); $sth->execute; my $goto= $sth->fetchrow_array (); my $url="http://observatory.designobserver.com/entry.html?entry=".$goto; $m->redirect($url);