rma.eugene Posted May 28, 2010 Share Posted May 28, 2010 Hey all, New to the forums. So i've got the result of a query and I'm looping through it to create kind of a list thing. What I'd like to be able to do is allow the user to click on a link for one result and have that result display in more detail on another page, ideally without another query. I was thinking maybe when a user clicks on a link in the result div I would have the page submit a form which would post back with the $result class in a POST var, save that var. to a session and redirect to the new page... Hardly seems very elegant though :-S... If that would even work.... An all php solution would be nice. I Hope thats descriptive enough. Thanks!! if ($response->size > 0) { while (!$done) { foreach ($response->records as $record) { $pic = KIDPIC_BASEDIR . $record->fields->Child_s_Photo__c; $bio = $record->fields->Child_s_Bio__c; $b_num = $record->fields->Child_s_Bnum__c; // and more.... echo <<<EOF <div class='child-border'> <div class='child-row'> <div class='child-left'><a href='$pic'><img src='$pic' width='160px' height='160px' alt='child-image' /></a></div> <div class='child-right'> <h3>$name</h3> <p>$bio</p> <small>$b_num</small> </div> </div> </div> EOF; } ... Link to comment https://forums.phpfreaks.com/topic/203222-on-submit-send-object-though-session-to-new-page/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.