Passing PHP variables
Posted: Tue Sep 30, 2008 4:25 pm
I've got an external file that sets a DIV background as
And the code in that php file is this:
The idea is that when a user clicks a particular link, a corresponding image will then be assigned to be the background image of that div. Basically, it's a thumbanail gallery linking to full size images, and I want that full size image to be the background of that div.
The problem is that the big_pic_image.php file isn't "seeing" the query string in the URL, so it doesn't know which link was clicked and then which image to show. The
The CSS file just sees the background set to http://vitanova.charlesrubinoff.com/_ot ... _image.php, but I need that file to then show the particular image based on what a user clicked.
Any ideas?
Code: Select all
background: url('http://vitanova.charlesrubinoff.com/_other/includes/big_pic_image.php') center center;}
Code: Select all
<?php
if (!$_GET[image]) {
$image = "http://vitanova.charlesrubinoff.com/sections/_other/image.php/?width=600&height=450&image=/sections/$_GET[section]/_cover/cover.jpg"; }
else {
$image = "http://vitanova.charlesrubinoff.com/sections/'.$_GET[section].'/'.$_GET[category].'/'.$_GET[image].'"; }
header("Content-type:image/jpeg");
readfile("$image");
?>
The problem is that the big_pic_image.php file isn't "seeing" the query string in the URL, so it doesn't know which link was clicked and then which image to show. The
The CSS file just sees the background set to http://vitanova.charlesrubinoff.com/_ot ... _image.php, but I need that file to then show the particular image based on what a user clicked.
Any ideas?