|
Posted by Toby A Inkster on 01/03/08 10:14
Rik Wasmus wrote:
> Short of storing the entire result in a session, or as hidden form
> fields, yes, you query that (again). It should have very little overhead
> though.
Another way is to use something like this:
$data = array(
'date_of_birth' => '1980-01-01',
'name' => 'John Smith',
'address' => '123 High Street'
);
printf('<option value="%s">%s</option>',
htmlentities(serialize($data)),
htmlentities($data['name'])
);
And then once the form has been posted:
$data = unserialize($_GET['whatever']);
Don't do that unless you really trust the users though, because the $data
you get back could contain anything!
--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 3 days, 21:23.]
Sharing Music with Apple iTunes
http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/
Navigation:
[Reply to this message]
|