Gossamer Forum
Home : Products : DBMan SQL : Discussion :

Re: [donm] Private Mailer Mod Question

Quote Reply
Re: [donm] Private Mailer Mod Question In reply to
You could just query the user table for the email addy as long as there is a field for it. You could add this:

After:

if ($message) { print qq|<font color="red">There was a problem: $message</font>|; }
print qq|
<$font>Fill in your email address, the subject of your email and the
message you wish to send to $Playername.</font>
|;

Add:

my $username_q = $DBH->quote($db_userid);

$query = qq!
SELECT Email FROM $db_table_user
WHERE username = $username_q
!;
my $sth = $DBH->prepare($query);
$sth->execute();
if ($sth->rows) {
while (@data = $sth->fetchrow_array) {
$email = $data[3]; # change to correct field number for email
}
}

$sth->finish;

Then replace:

<td><input type=text name="email" value="$in{'email'}" size=40></td></tr>


with:

<td><input type=hidden name="email" value="$email" size=40></td></tr>


I haven't tested this, but it should work without any other changes.


DBMan SQL Version 1 mods available at:
http://dbmansqlmods.rainbowroomies.com
(Mods based on JPDeni's original mods.)
Subject Author Views Date
Thread Private Mailer Mod Question donm 4549 Apr 1, 2004, 10:56 AM
Thread Re: [donm] Private Mailer Mod Question
604 4411 Apr 1, 2004, 11:52 AM
Thread Re: [TheStone] Private Mailer Mod Question
donm 4401 Apr 1, 2004, 12:49 PM
Thread Re: [donm] Private Mailer Mod Question
shann123 4410 Apr 3, 2004, 5:05 AM
Thread Re: [shann123] Private Mailer Mod Question
donm 4386 Apr 3, 2004, 5:54 AM
Post Re: [donm] Private Mailer Mod Question
shann123 4391 Apr 3, 2004, 6:47 AM