473,766 Members | 2,060 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

photo gallery question

hi every body
I need help please

i have designed an image gallery of about 20 pictures and they are
shown in thumb nail views and for viewing the largeer version of the
images i have added a radio button and a push button, so that the user
choose the picture using the radio button and click on the push button
to open the larger version picture in another window, but my problem
is that i know how to pass the selection to the second page but the
problem is how to pass the selected picture not selected value.

the first html page code is:

<form method="POST" action="gallery .php">
<input type="radio" value="V1" name="nature">
<p><input type="radio" value="V1" name="nature"></p>
<p><input type="radio" value="V1" name="nature">
</form>
the gallery.php code is:

<?php
$image = $_POST['nature'];
echo "$image"
?>
my problem is that this way gives me the name of the radio button i
select not the image so how i can make the image get shown not the
radio button name (not V1)
Thanks in advance for your help

shror

Feb 25 '07
11 2096
On Tue, 27 Feb 2007 09:56:29 +0100, Geoff Berrow <bl******@ckdog .co.uk>
wrote:
Message-ID: <op************ ***@cp139795-a.landg1.lb.hom e.nlfrom
OmegaJunior contained the following:
>Imagine a hacker who happens to know or guess the system
you use, and then requests your gallery.php to show the contents of that
configuratio n file?


How would a gallery script show the contents of a .php file?
That highly depends on the gallery script, doesn't it? If the script would
perform an fopen() or file() on any file name it receives, and then echoes
the result to the browser, you bet the contents of a .php will be shown.

If the gallery script merely enters the received file name into the src
attribute of an img element, there's little to fear. But if we'd enter it
into the data attribute of an object element or the href attribute of an
iframe element, there's a lot to fear.

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Feb 27 '07 #11
Message-ID: <op************ ***@cp139795-a.landg1.lb.hom e.nlfrom
OmegaJunior contained the following:
>How would a gallery script show the contents of a .php file?

That highly depends on the gallery script, doesn't it? If the script would
perform an fopen() or file() on any file name it receives, and then echoes
the result to the browser, you bet the contents of a .php will be shown.

If the gallery script merely enters the received file name into the src
attribute of an img element, there's little to fear. But if we'd enter it
into the data attribute of an object element or the href attribute of an
iframe element, there's a lot to fear.
Thanks, I just thought it was worth pointing that out to the OP to
prevent needless paranoia.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Feb 27 '07 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3411
by: Daniel Kelly \(AKA Jack\) | last post by:
Hi! I'm searching for a Photo Gallery software package (like Coppermine and Gallery) that works, from the ground up, like a database-driven app. In other words, I want a gallery which entirely does away with the hierarchical structure of traditional gallery apps and allows the user to select, from a list of criteria, whatever photos he or she wishes to see. For example, each photo would have entries for photographer, category, date,...
10
2879
by: matt | last post by:
I have this code, works perfectly on Windows server, but now i'm trying to run it on a Linux server, the form submits, i get no errors, but the photo doesnt upload, and the caption file doesnt write.... any ideas why?? <?php include 'gall_settings.inc';
7
3271
by: Eric Lindsay | last post by:
I would like to do a photo gallery with a liquid layout. I wanted to center a caption below each photo (or above each photo). I can do that easily with tables, but then I don't have a liquid layout. Besides, I wanted to try to do it with CSS. I can do centered captions with text-align. This works provided the element containing each photo is floated left. I have found several examples of how to do this. However I didn't want the...
1
2916
by: desjardins.daniel | last post by:
Hi ! Excuse my english, i'm a french canadien... So here my message : I have put on my site a photo gallery and at the right a nav menu. This menu has a red dot visible want someone is passing over one item or clickong one item. I want to make two things in this page (the sameone http://www.danieldesjardins.com/gallery/1202015) so it would be like a
13
4347
by: Viken Karaguesian | last post by:
Hello everyone, Can anyone recommend a good online site to learn PHP? The W3Schools website is quite lacking - leaves much to be desired. I'm sure there are many places, but which ones are good? I currently run a site with an extensive photo gallery. Hundreds of photos. Right now I have a system which the thumbnails are laid out in a table. You click on a thumbnail and you see the full size picture. That full size picture is in its...
1
2229
by: Throw | last post by:
G'day everyone I'm looking for a simple photo gallery script in PHP (or Perl), but not too simple. I have tried several photo gallery scripts in either language and I have found that they are either too complex or too simple for my purpose. Most photo gallery scripts are intended primarily for sharing new photos continuously and allowing visitors to comment on them. I want something more static, which allows more text content.
1
3606
by: cumupkid | last post by:
II am trying to create a form that will allow me to upload photos to a folder in the site root directory and add the information to the mysql db at the same time. I have created two forms, one that uploads to photo to the folder in the site root diorectory. One that uploads the info to mysql database. but... When I try to upload them both ways at the same time i cant get it. I am Including code for both pages i have working. Code for...
1
1832
by: popotz | last post by:
Hi..I really need a big help.. I was wondering how to make my own photo gallery for my own website. The photo must be uploaded first, and then it automaticly putted into the gallery..if we click the photo, then it will go to the photo full sreen.. I don't know how to make the script for put it into the gallery.. best regards, Erwin Chrisman
0
2307
nomad
by: nomad | last post by:
Hello Everyone. I founded an Flash and xml photo gallery. It works but I took it to another step What I want is to have six different galleries in one Flash file. I figure out how to do that but when I click on the the galleries I can see the pervious gallery files. The gallery works like this: When you open the gallery there are links on top of the page where you can go to other gallery; with gallery one which has small thumbnails on...
0
9404
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8833
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7381
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6651
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5279
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3929
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.