Gossamer Forum
Home : Products : DBMan : Installation :

Can anyone see what's wrong with this?

Quote Reply
Can anyone see what's wrong with this?
Hi,

Further to my posts of the last couple of days, I've written a sub which is called from a javascript window. As far as I can tell the sub is fine - but when I "post" or "get" to it, I get an "unrecognised operation" thingee.

Can anyone see what I'm doing wrong in the calling - or is their something else I have to define?

This is the sub:

sub send_message {
#---------
#Send Message to user Build 1
#---------

# my ($message, @lines, $line);
# my ($output, $status, $counter);

# Set the userid to the logged in user.
# if ($auth_user_field >= 0) {
# $in{$db_cols[$auth_user_field]} = $db_userid;
# }

$mailprog = "/var/qmail/bin/qmail-inject";


open (MAIL, "|$mailprog -t")
| | print "Can't start mail program";
print MAIL "To: Lmoss\@ihug.co.nz"; # $rec{'Email'}\n";
print MAIL "From: $in{'Name'} (Posted from $tft)\n";
print MAIL "Subject: A message from $in{'Name'} posted from $tft\n";
print MAIL "-" x 60 . "\n\n";

print MAIL "$FORM{'Message'}\n\n";

print MAIL "Some information about $in{'Name'}:\n\n";
print MAIL "Age: $in{'Age'}\n";
print MAIL "Sex: $in{'Sex'}\n";
print MAIL "City: $in{'City'}\n";
print MAIL "State: $in{'State'}\n";
print MAIL "Country: $in{'Country'}\n";
print MAIL "Height: $in{'Height'}\n";
print MAIL "Weight $in{'Weight'}\n";
print MAIL "Hair: $in{'Hair'}\n";
print MAIL "Eyes: $in{'Eyes'}\n";
print MAIL "Seeking: $in{'Seeking'}\n";
print MAIL "Comments: $in{'Comments'}\n";
print MAIL "Homepage: $in{'Homepage'}\n";
print MAIL "ICQ: $in{'ICQ'}\n\n";
print MAIL "-" x 60 . "\n\n";
print MAIL "To reply to this message, log on to $tft (http://tablefortwo.hypermart.net)\n";
print MAIL "and search for $in{'ID'} on the locator.\n\n";
foreach $line(@closing) {
print MAIL "$line";
}

print MAIL"\n\n";
close (MAIL);
}
#End of send_message
#--------------------------------------------

And this is the form that calls it:

<form action="$db_script_url" method="POST"> <input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<TEXTAREA NAME="Message" ROWS=6 COLS=45 WRAP="VIRTUAL"></TEXTAREA><p><input type="submit" Value="Send" name="send_message"> <input type="Reset" value="Clear"></form>

Sorry that it's so unclear Smile

Anyone got any ideas?


Subject Author Views Date
Thread Can anyone see what's wrong with this? Samuel 3402 Nov 30, 1998, 7:27 PM
Post Re: Can anyone see what's wrong with this?
Alex 3336 Dec 1, 1998, 1:06 PM
Post Re: Can anyone see what's wrong with this?
Samuel 3325 Dec 1, 1998, 9:29 PM