PHP - SQL - 显示图像 [英] PHP - SQL - Showing Images

查看:87
本文介绍了PHP - SQL - 显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Again

我没有真正向您展示,因为数据库没有填充。但我正在尝试建立我昨天学到的关于使用带有超链接来调整图像可见性的javascript的知识。

这个概念很棒,适用于主页。所有图像都装在同一个地方,但设置为不显示。然后将其中任何一个设置为在单击缩略图时显示。

但我现在正在查看我项目中的下一个任务,这个任务更复杂。我可以从数据库中提取细节并将它们并排显示为单行表中的小图像:


Hi Again

I have nothing really to show you yet as the database is not populated. But I am trying to build on the knowledge I learned yesterday about using javascript with a hyperlink to adjust image visibility.

That concept is great and works well for the home page. All images are loaded in the same place but set to not display. Then any one of them is set to display when a thumbnail is clicked.

But I am now looking at my next task in my project which is abit more complex. I can extract details from a DB and display them side by side as small images in a single row table:

 



























echo" < td > " ;
echo" < img alt = \"英寸;
print $ db_field ['description'];
echo" \" title = \"" ;;
print $ db_field ['description'];
echo" \" src = \" images /" ;;
print $ db_field ['image'];
echo" .jpg \" /> < br > " ;
print $ db_field ['description'];
echo" < ; / td > 英寸;
        echo "<td>" ;  
        echo "<img alt=\"";  
        print $db_field['description'];  
        echo "\" title=\"";  
        print $db_field['description'];  
        echo "\" src=\"images/";  
        print $db_field['image'];  
        echo ".jpg\" /> <br>";  
        print $db_field['description'];  
        echo "</td>";  
 

推荐答案

我应该澄清我的要求。也许URL会有所帮助:

http://www.furnitureshop.co.uk/test/ test.html

数据库读取和超链接显示旨在来自底部的内联表。所以我需要调整我的PHP:

a)这样图像就是超链接

b)点击它们会更新test.html上的主图像*

* not然后把任何图像放在那里。

谢谢。

Andrew
I should clarify my request. Perhaps a URL will help:

http://www.furnitureshop.co.uk/test/test.html

The database reading and hyperlink display is intended to come from the inline table at the bottom. So I need to adjust my PHP:

a) so that the images are hyperlinks

b) when clicked they update the main image on test.html*

*not yet put any image there.

Thanks.

Andrew


这篇关于PHP - SQL - 显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆