Jump to content

On submit send object though session to new page


rma.eugene

Recommended Posts

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;
} ... 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.