hi there
i have tried the following code in add.cgi to prevent dublicate additions to the database.
# Check for duplicates..
my $url = $in->param('URL');
my $sth = $val->prepare ("SELECT ID FROM Links WHERE URL LIKE '$url_'");
$sth->execute();
if ($sth->rows) {
if ($in->param('CategoryID')) {
$name = &get_category_name ($in->param('CategoryID'));
$category = "$name <input type=hidden name='CategoryID' value='" . $in->param('CategoryID') . "'>";
}
else {
$category = &get_category_list();
}
return &site_html_add_failure( { error => "Duplicate URL",Category => $category, %in }, $dynamic);
}
The proble i am getting an error message upon callinbg add.cgi:
Software error:
Execution of add.cgi aborted due to compilation errors.
Can someone check it and tell me what is wrong?
Thanks
Abdoulrahman
i have tried the following code in add.cgi to prevent dublicate additions to the database.
# Check for duplicates..
my $url = $in->param('URL');
my $sth = $val->prepare ("SELECT ID FROM Links WHERE URL LIKE '$url_'");
$sth->execute();
if ($sth->rows) {
if ($in->param('CategoryID')) {
$name = &get_category_name ($in->param('CategoryID'));
$category = "$name <input type=hidden name='CategoryID' value='" . $in->param('CategoryID') . "'>";
}
else {
$category = &get_category_list();
}
return &site_html_add_failure( { error => "Duplicate URL",Category => $category, %in }, $dynamic);
}
The proble i am getting an error message upon callinbg add.cgi:
Software error:
Execution of add.cgi aborted due to compilation errors.
Can someone check it and tell me what is wrong?
Thanks
Abdoulrahman