2

I have standard text links which all say "Full View". When clicked these links send out php in this form: http://mysite.com/fullview.php?myimage=30

Basically there's thumbnailed images and text links that say full view. I'd like for fullview.php to capture the myimage variable, and display it as a full sized image. Meaning, a blank page (fullview.php) displaying the image. Sounds likes javascript to me.

How do you put the javascript into fullview.php to capture the variable and display it as a full sized image?

Thanks for any help, Darrell

2 Answers 2

1

php is server side script javascript is client side script

so displaying a web page to a user first is executed php and result is send to client. After he receive it then javascript is executed

HTH

Ivo Stoykov

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks, that's what I'm trying to do, but how.
from php you have to 'echo' your javascript i.e. echo "var test = 'test string';"; javascript's variable you could pass to php either via query string (and access them with $_GET) or via html form ($_POST). Alternatively you could use ajax. No other ways
Got rid of the text links, and linked off of the thumbnails to open full image in blank window. Thanks for your help.
1

You just need to read the query parameters. In fullview.php you can use

$myimage = $_GET['myimage']; to capture this variable. And then can use it accordingly.

5 Comments

How do you use it? Inside an image tag? How do you get this to display the picture in fullview.php?
what do you want to do with the value 30?
The value 30 could be any number. The value represents an image. Example: image number 46. I want to use the current variable to display the image on fullview.php. Fullview.php is basically a blank page.
I tried 20 variations of this with no success. Any javascript solutions you can think of? As the other person who answered said, "php is server side script javascript is client side script"
any ideas about the javascript solution?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.