473,695 Members | 1,871 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 2357

da***********@h otmail.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_arr ay ($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_arr ay ($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
2642
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 HP , to fit the actual Browser size. So I found this: > > <HTML><HEAD></HEAD>
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 thumbnail images I have are uniform in size in the sense that the longest dimension is fixed, and the shortest dimension is fixed. That is, if it's a horizontal image, the width is X, if it's a vertical image, the height is X. I used to create...
5
6260
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 src="foobar.jpg" alt="foobar"></a> but not in Opera. I imagine that border colour normally defaults to transparent, but
6
6199
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 displays, and I only reluctantly experiment with two-column layouts from time to time. One component of traditional book typography has always been the figure/caption combination. I haven't been following discussion on this topic for a year or...
8
2033
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 images of the thumbnails. When the slideshow begins it always starts with the first image. I would like to pass the name of the thumbnail to the slideshow HTML page and begin the slideshow with the same image the user clicks on. Is this asking...
1
1495
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 USERS table, with the column 'USERID' as a primary key. Other columns would be 'NAME' and 'EMAIL'. In my users table I have two rows: and
3
1792
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 page. Something like this: --------------------------------------------- | |
2
2475
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 the bottom of the page. Please reply....
1
2092
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 hyperlink address in a text box next to it. These values are stored in a table named tblHyperlinks with the document type as a lookup/number (field name strDocName) and the hyperlink itself (field name hypLink). Once all of the applicable documents'...
0
8568
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
9115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8982
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8845
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8825
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7660
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...
0
4579
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3003
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
3
1976
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.