Jeff, et al --

...and then Jeff McKeon said...
% 
% I have a php page that has a web form on it.

Yay!  Yippee!  That's great!

Oh, that's not the substantive body of your note? :-)


% 
% I do a query to populate the options in a drop down box in the form.
% 
...
% So when the user selects an email addres from the drop down box, the
% userID is stored and later writen to a database.

Right.


% 
% What I now need to do is store not only the userID but the email address

OK.


% as well.  Is there a way using a form to store 2 values using one drop

Well, yes and no.  You can store only one value in a field, but that
value can be anything you want it to be.


% down box?  So basically I want to store the userID and the Email address
% to a variable in the form so that both may be written to different
% fields in the database later.

If I were going to do this (and I've done a bit like it), I would first
make an array of everything to be sent, then serialize it, and finally
base64_encode it and use that as the value.  When you get it on the other
side, just decode and then unserialize and you have your array back to
use as you wish.  This works for large numbers of vars as well as just a
few.


% 
% Jeff


HTH & HAND

:-D
-- 
David T-G                      * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/      Shpx gur Pbzzhavpngvbaf Qrprapl Npg!

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to