473,503 Members | 11,281 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Hyperlinked Images within a Auto Cascading Table PHP

I am creating a basic website to store people profiles and within this
website
i have a page that creates a table dependent on the number of records
in mysql
written in PHP within these tables they show images i need these images

to hyperlink to
other HTML pages...

Note these tables are written within the <?PHParea of the full Script

so the basic
HTML - <a href="URL"><img src="PATH"></a>
written inside the auto table script does not work as it is HTML with
PHP
i need the same process to work within the generated PHP Table
Easy - A - Store image (Locations) in Mysql
Easy - B - Display images in Automatic Table produced by number of
records in PHP
Help - C - Make these same images within the Auto Table Hyperlink to
other HTML pages
(Note the reason this is a Auto table is simply the fact the PHP
requests the number of records
then with this it creates the table of fields, i need the images in
those fields to hyperlink
the basic <a href="URL"><img src="PATH"></awithin PHP does not work
as the table is autogenerated
all the contents need to be in the PHP Area )
Example
<?php
Generate table if records exist
<Table>
contents
Hyperlink Images
</table>
?>
<html>
Echo Table Contents
</Html>
Pls help if you can thanks in advanced....

Aug 16 '06 #1
1 2345

da***********@hotmail.co.uk wrote:
I am creating a basic website to store people profiles and within this
website
i have a page that creates a table dependent on the number of records
in mysql
written in PHP within these tables they show images i need these images

to hyperlink to
other HTML pages...

Note these tables are written within the <?PHParea of the full Script

so the basic
HTML - <a href="URL"><img src="PATH"></a>
written inside the auto table script does not work as it is HTML with
PHP
i need the same process to work within the generated PHP Table
Easy - A - Store image (Locations) in Mysql
Easy - B - Display images in Automatic Table produced by number of
records in PHP
Help - C - Make these same images within the Auto Table Hyperlink to
other HTML pages
(Note the reason this is a Auto table is simply the fact the PHP
requests the number of records
then with this it creates the table of fields, i need the images in
those fields to hyperlink
the basic <a href="URL"><img src="PATH"></awithin PHP does not work
as the table is autogenerated
all the contents need to be in the PHP Area )
Example
<?php
Generate table if records exist
<Table>
contents
Hyperlink Images
</table>
?>
<html>
Echo Table Contents
</Html>
Pls help if you can thanks in advanced....
here's one way (abridged)

echo "<table>\n";
while ($row = mysql_fetch_array ($result,MYSQL_ASSOC))
{
//results
echo "<tr>\n";
echo "<td><a
href='your_url/page.htm?&eg={$row['field']}'>{$row['field']}</a></td>\n";
echo "</tr>\n";
}
echo "</table>\n";

You can also write it something like this (which might,for all I know,
be better practice). Personally, I find it less readable:
?>
<table>
<?
while ($row = mysql_fetch_array ($result,MYSQL_ASSOC))
{
//results
?>
<tr><td>
<a
href='your_url/page.htm?&eg=<?{$row['field']}?>'><?{$row['field']}?></a>

etc, etc

Aug 16 '06 #2

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

Similar topics

0
2634
by: Henk Verhoeven | last post by:
(Reply on this newsgroup to an email - reply by email did not work) Wolfman wrote: > > Hi, > I found your Email in the php Newsgroup. > I was looking for some way to resize some graphiks on my...
5
1975
by: Fred | last post by:
I've written a number of "image gallery" pages before, but I'm trying to do something a little different. All the images are rectangular (these are just pictures from my camera), and the...
5
6250
by: Headless | last post by:
The following code renders a visible border around the hyperlinked image using the UA's default colours for links in IE and Moz: a img{border-width:1px} <a href="foobar.html"><img...
6
6188
by: Robert J. O'Hara | last post by:
I'm one of those people who practices what some consider "dull" and others consider "elegantly conservative" page design. I appreciate good traditional typography and standards-compliant liquid...
8
2018
by: drillbit_99 | last post by:
I have an HTML page of thumbnail images. Each image can begin a slideshow of the images on the page by clicking on the image. This opens another HTML page that begins the slideshow using large...
1
1477
by: Good Man | last post by:
Hi there I was just wondering why I should explicitly create a foreign key, especially if i'm not concerned with Cascading/Deleting when a row is changed. For example, let's say I have a...
3
1784
by: arbeizaf | last post by:
Hi: I am using CSS instead of tables for the layout of a webpage but I don't know how to do something. I need to place three images with the same distance among them and the border of the...
2
2457
by: vinit_mahajan99 | last post by:
Hello all, I want to align the images and controls at the bottom of a master page or at the right side. I tried to do it with the table but I was not successful. The image should be seen at...
1
2077
rsmccli
by: rsmccli | last post by:
Hello. Long time reader, first time poster... Anyway, here is my problem. We are using Access 2002 I have a subform on our FE where you pick a document name from a combobox, then input a...
0
7095
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...
0
7361
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7015
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5602
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,...
0
4693
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...
0
3183
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...
0
3173
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
749
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
403
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...

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.