[FX.php List] Passing Data 101

Andy Gaunt andy at fmpug.com
Thu Jun 9 20:25:34 MDT 2005


Jonathon -

If you change your variables from a $_POST to a $_REQUEST you can recall
them on the same page. This is useful in this instance of changing the sort
order of data already returned.

We are doing something similar at the new FMPug website
(http://www.pug-planet.com)

If you stop by and go through the visitor form (Just captured for the beta
testing process) and then click into the member directory link you will see
a set of icons under the heading "Looking for something in particular?"

If you click on these icons we are doing a new search request but returning
the result to the same page.

We could just as easily be altering the sort order.

HTH

Regards

Andy Gaunt	
T: 407.810.4722
andy at fmpug.com
http://www.fmpug.com

June 23rd 2005, 7pm Orlando FMPug
Register interest online at http://www.pug-planet.com/rsvp.php

-----Original Message-----
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan Schwartz
Sent: Thursday, June 09, 2005 10:12 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Passing Data 101

At 9:46 PM -0400 6/9/05, Stephen Knight 1-800-353-7950 wrote:
>Hi Jonathan,
>
>
>This would depend on how you are storing data in $query.  Try echoing
$query
>to the page to see what if anything you are actually storing there.  If you
>are performing a sort on different pages then yes you will need to recreate
>the initial query.

As a matter of fact, the origin of the pages are from your PHP 8 Hours
videos.

I did echo the $query field, and nothing is printed.   Not surprised, 
because I'm not really sure how to capture the original query and 
pass it to the next search result page containing the alternate sort 
order.

I do have the following lines on the initial search result page, 
which attempts to accomplish what I am trying to do.  I'm still at 
the stage of cutting and pasting code from other examples to figure 
out how this all works:

<snip>
$query = $_POST['query'];
<snip>
$search->AddDBParam('query',$query);
<snip>
<a href="search_result_first.php?<?php echo $query; ?>">First</a>

Jonathan

-- 

Jonathan Schwartz
Schwartz & Company
817 Marin Drive
Mill Valley, CA 94941
Phone: 415-381-1852
jonathan at eschwartz.com - http://www.eschwartz.com

There's *always* a logical answer....most of the time.
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list