Re: Help me dig out of a mini-nightmare. Some parameters transfer, others do not.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 July 2010 06:13, Bill Mudry <billmudry@xxxxxxxxxx> wrote:
> Along with suggestions from this group, I was able to transfer parameters
> across html pages so that
> a user could pick a wood species and the new page would faithfully report
> details on that wood.
> Later (with help from the group again) I was so glad to see that these pages
> were able to pick up
> JPEG scans of how some woods look like, one more important step forward for
> the project. When I then added a form for users to choose what extra data
> they wanted to see and it would recycle to
> the same page, the scan picture would disappear. A suggestion of adding a
> hidden field in the form
> even fixed that :-) . Things went swimmingly for a while.
>
> I don't know just what I did wrong but somewhere between trying to add some
> Javascript to create
> new pop ups (they even work now, too) for user choices for showing other
> photos, I messed up the page bad enough that it took a few days to even get
> everything showing up again. Well .... almost everything.
>
> It is able to pick up the choice of botanical name that a user chooses from
> a very large list of woods and display the text data for that one wood just
> fine again on another page. What I cannot seem to get back again is to show
> the wood scans for those woods for which I have scans (.... literally
> scanned on a scanner, btw, instead of a camera).
>
> I have temporarily hard coded a full path and file name for a typical wood
> that should have a picture
> to show .... and the scan shows up just great, proving that part of the
> logic is still intact, fine and working. The problem seems to be for some
> reason that I no longer understand in getting the name and partial path of
> the scan file to show up via the super-globals.
>
> Both the botanical name ('species_name') and the scan picture name
> ('picture_filename1')
> are stored in the table 'species'. The scans actually have a gallery folder
> as part of what is stored
> (eg. "gallery_a/ablies_alba, gallery_b/betula_nigra, and so on).
>
> I have tried using (parse_str($_SERVER['QUERY_STRING'], $qs). I have tried
> using $_GET that
> has worked well before ..... but to no avail. I did try experimenting quite
> a bit before finally and
> with some regret deciding I am past what I know on why NOW (remembering this
> used to work)
> I just cannot get the content from column picture_file1 to come across also.
> I keep saying it SHOULD
> work.... but it doesn't.
>
> With more and more functions being installed on this page, I will still put
> the whole page code,
> even though it will have sections that need no attention ... just to be on
> the cautious side. This seems
> so elementary and yet I cannot get it to work. (bear with so many commented
> statements .... stabs
> at getting this to work).
>
> Three steps forward ..... one step back ......
>
> Bill Mudry
>

Hello Bill,

My personal preference is to store the data in the $_SESSION. Once you
do that, each page really only has to provide your code with new data.
Once you are back at the server, any previously received data is in
the session. This will be available for all requests (css, images,
javascript, etc.) so you don't need to tack parameters onto the URL or
hidden <inputs>.

So, for a popup making requests for an image will have access to the
$_SESSION exactly the same way (assuming the request is to a PHP
script which has to find the image, etc.)

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux