First, you can ABSOLUTELY not detect who drops something. For SL, dropping items into an object is the same than giving items to another AV. Once you detect something is dropped, you are already the owner.
The common way around is to have the AV touch the object before to allow the drop... but it doesn't prevent any passing-by AV to drop all his inventory after the first has triggered the "opening of the box". Allowing drop on an object means: "This object is now like a trashcan in a public parc"...
And: "All your trash are belong to us". No filtering whatsoever is possible.
Next, unless you explicitely state that ppl must drop only freshly created notecards --so that you can detect the creator-- there is no direct way to retrieve the previous owner. If somebody recycle an old notecard and doesn't write his name in it, you will know nothing about this notecard except the creator.
Last, one thing must be clear: There is ABSOLUTELY no way to give a personalised notecard. Neither the name, nor the date, nor the contents. Nothing. Period.
The rest is quite easy... but not 100% bulletproof
This untested script assumes your drop box has at least 2 prims and will move the received notecards in the child prim.
(Quote me to retrieve the layout.)
string Confirmation = "Confirmation Notecard";
key Storage;
key Toucher;
integer Dropped;
default
{
state_entry()
{
llAllowInventoryDrop(FALSE);
Storage = llGetLinkKey(2); // We put the received notecards in a safe place
}
touch_end(integer num)
{
Toucher = llDetectedKey(0);
state openbox;
}
}
state openbox
{
on_rez(integer param) { state default; }
state_entry()
{
Dropped = FALSE;
llAllowInventoryDrop(TRUE);
llInstantMessage(Toucher, "You have 30 secs to drop your notecard."

;
llSetTimerEvent(30.0);
}
timer()
{
llSetTimerEvent(0.0);
if (! Dropped)
{
llInstantMessage(Toucher, "No valid drop was detected. Try again."

;
}
state default;
}
changed(integer change)
{
if (change & (CHANGED_ALLOWED_DROP | CHANGED_INVENTORY))
{
key owner = llGetOwner();
integer i = llGetInventoryNumber(INVENTORY_ALL);
for (--i; i >= 0; --i)
{
string item = llGetInventoryName(INVENTORY_ALL, i);
key creator = llGetInventoryCreator(item);
if (creator != owner)
{
if (creator == Toucher)
{
if (llGetInventoryType(item) == INVENTORY_NOTECARD)
{
Dropped = TRUE;
llGiveInventory(Storage, item);
}
}
if (llGetInventoryType(item) != INVENTORY_NONE)
// Better be over-cautious than sorry
{
llRemoveInventory(item);
}
}
}
if (Dropped)
{
llGiveInventory(Toucher, Confirmation);
llInstantMessage(Toucher, "Thanks."

;
}
state default;
}
}
}
// End of script
Have fun!