The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

You're right - the data is coming from a MySQL database, and I can quite easily do a query on the 'receiving' page, but seeing as I've already done a query on the first page to get the secondary age variables, I was trying to find away to avoid re-accessing the database for the same info.

You know, I'm sure I had a bit of javascript a while ago which did the job, but I can't for the life of me remember which site I put it in, and I haven't been able to find any reference to it in the major forums.

No worries - there's always more than one way to skin a cat . So in the meantime my solution has been to put both values in the same variable, eg.

...and then on the receiving page I use PHP to separate out the result:

list($first,$age)=explode("|",$first);

OK, so this avoids me having to re-lookup the age data from the database for the selected name, BUT it would be slicker if I didn't have to do any additional coding on the receiving page at all. Hence the javascript request in my original post. I really must get around to fully learning javascript one day instead of always relying on re-using other people's code