Gossamer Forum
Home : Products : DBMan : Installation :

Eliot Ive tried this and it didnt work

Quote Reply
Eliot Ive tried this and it didnt work
Hi there eliot

Ive tried implimenting the imgages drop down you specified in http://www.gossamer-threads.com/...um5/HTML/001719.html

Ive played a little bit as i require 4 images to be selected for 20 fields, but i getting an error at line 796, Which corresponds to

if ($rec{'pos1'} = '1') {
print qq|<$img1>|;
}
if ($rec{'pos1'} = '2') {
print qq|<$img2>|;
}
if ($rec{'pos1'} = '3') {
print qq|<$img3>|;
}
if ($rec{'pos1'} = '4') {
print qq|<$img4>|;
}
else {
print qq| |;
}

Can you see any errors here.

Ive uploaded the html and cfg files here.

http://www.metro-records.co.uk/chartcfg.txt
http://www.metro-records.co.uk/charthtml.txt



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk
Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
BTW: The better Forum to ask this type of question is in the DBMAN Discussion Forum, since you have the script installed. Wink

The main error I see is that you have single quotes around the number rather than double quotes, like I have in the Mod I provided in that other Forum.

Try using double quotes, like the following:

Code:
if ($rec{'pos1'} = "1") {
print qq|<$img1>|;
}
if ($rec{'pos1'} = "2") {
print qq|<$img2>|;
}
if ($rec{'pos1'} = "3") {
print qq|<$img3>|;
}
if ($rec{'pos1'} = "4") {
print qq|<$img4>|;
}
else {
print qq| |;
}

Hope this works and helps.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
Hi eliot

Sorry I tried that first of all and got the same error, so I changed it to single quotes.



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk
Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
Hi there,

Maybe i should explain,

Im trying to create a database of music charts and at the edge of each entry im entering one of 4 images either up, down, new, non mover.

Do i need to create a seperate field definition for each of the 20 or can i just use one definition and use it on all 20.



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk
Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
Yes.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
Sorry eliot

So i can use one drop down box for each field, If so instead of doing it the fancy way as above can i create a drop down box with a link to the image url and then the image will display.

PS can you mail me your personal email again at mdj1@lineone.net otherwise you wont be getting your xmas pressie



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk
Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
The best thing to do is use the fancy select mod so that the numbers values can be seen as something like "Up", "Down", etc. in the drop-down menu.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------


Quote Reply
Re: Eliot Ive tried this and it didnt work In reply to
Thanks eliot,

I'll give it a try.

PS I got your mail.



------------------
Regards
MDJ
http://www.isee-multimedia.co.uk