jwlarson3rd has asked for the wisdom of the Perl Monks concerning the following question:
the above script retrieves info from a mysql database and uses the info to display images on a page. I need to add some funcitonality that when a images are clicked on a larger images is displayed in a clickable slide show format#!/usr/bin/perl use CGI; use strict; use DBI(); my $q=new CGI(); my $dbh = DBI->connect("DBI:mysql:bthcraft", "#######", "#########"); print " Can't connect to database\n" if ! defined $dbh; my $nme=$q->param('name'); my $stht = $dbh->prepare("SELECT * FROM images where username = '$n +me'"); $stht->execute(); print $q->header(); print $q->start_html('display'); while (my @dat=$stht->fetchrow_array()) { print "<INPUT TYPE=IMAGE NAME=image height='100' width='100' SRC='http://typhoon.he.net/~bthcraft/$dat[0]/images/$dat[1]' >"; } print $q->end_html; $stht->finish; $dbh->disconnect;
any help would be appreciated
JOHN LARSON
Code tags - dvergin 2003-12-03
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: clickable slide show perl
by pg (Canon) on Dec 03, 2003 at 21:19 UTC | |
by jwlarson3rd (Acolyte) on Dec 04, 2003 at 02:41 UTC | |
|
Re: clickable slide show perl
by Joost (Canon) on Dec 03, 2003 at 21:24 UTC | |
by jwlarson3rd (Acolyte) on Dec 04, 2003 at 02:37 UTC | |
|
Re: clickable slide show perl
by Roy Johnson (Monsignor) on Dec 03, 2003 at 21:40 UTC |