Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4

Thread: passing values

  1. #1
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    It's late, I'm getting tired, and so forth.

    This is the problem:

    You can use PHP to manipulate images (like resizing them and scale down size, however at present you have to send the end result with headers, which effectively obliterates any HTML on the resulting page.)

    One way of bypassing this, is to put the actual resizing script in an img src tag.

    i.e.
    Code:
    Page B contains page C the following way:
    (Page C is the "someRescalingScript.php")
    
    <img src="someRescalingScript.php">
    This works fine, as the output from the "someRe..." is pure image. However, if you want your script to pass a value to this page....

    If page B includes an image-producing page called C (like in the above example), how can I make page A (which includes a form that gathers information, including the image reference that for the sake of the example is called $image) pass "$image" to page B that includes the page?

    You think it's unclear? So do I, so here goes again:

    Page A includes a form that set's variable $image, and passes it on to page B which eventually will produce the image in a set context. Only problem beeing that page B need to incorporate page C that actually manipulates the image ($image) passed on from page A.

    How do I make page C see the variable $image?
    S. Rosland

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    On page B:
    PHP Code:
    <img src="someRescalingScript.php?img=<?php echo $image?>">
    On Page C:
    PHP Code:
    $image $_GET['img']; 
    Is that what you're looking for?
    JR

  4. #3
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    Looks interesting JR! I haven't tried it out yet, will do soon.
    S. Rosland

  5. #4
    Senior Member rosland's Avatar
    Join Date
    Jul 2003
    Location
    Norway
    Posts
    1,944
    Member #
    2096
    I've tried your suggestion JR, and it works sweetly.

    Thanks!
    S. Rosland


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 08:48 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com