473,382 Members | 1,526 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Clicked link text

Hi,

I have created a table on the fly from mysql

while($row = mysql_fetch_array($query)) {

echo "<tr>";
echo "<td class='body'><a href='#'>".$row['au_id']."</a></td>";
echo "<td class='body'>".$row['au_fname']."</td>";
echo "<td class='body'>".$row['au_lname']."</td>";
echo "</tr>";
}

is there anyway of getting the current clicked au_id? i would like the
user to click the id to display more information but I'm unsure how to
get the currently clicked id...

Thanks

Jun 8 '07 #1
2 1674
c19h28o2 wrote:
Hi,

I have created a table on the fly from mysql

while($row = mysql_fetch_array($query)) {

echo "<tr>";
echo "<td class='body'><a href='#'>".$row['au_id']."</a></td>";
echo "<td class='body'>".$row['au_fname']."</td>";
echo "<td class='body'>".$row['au_lname']."</td>";
echo "</tr>";
}

is there anyway of getting the current clicked au_id? i would like the
user to click the id to display more information but I'm unsure how to
get the currently clicked id...

Thanks
One way:

while($row = mysql_fetch_array($query)) {
$auid = $row['au_id'];
echo "<tr>";
echo "<td class='body'><a
href='moreinfo.php?id=$auid'>".$row['au_id']."</a></td>";
//or something like
//echo "<td class='body'><a
href='moreinfo.php?id={$row['au_id']}'>".$row['au_id']."</a></td>";
//which I find really ugly :)
echo "<td class='body'>".$row['au_fname']."</td>";
echo "<td class='body'>".$row['au_lname']."</td>";
echo "</tr>";
}

On moreinfo.php, you'd have

<?php
$auid = $_GET["id"];

//do something with that particular author...
?>
Jun 8 '07 #2
Hi Denis,

Thanks for you help, works great.

Jun 8 '07 #3

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

Similar topics

1
by: Mat | last post by:
How can I detect when a link has been clicked but the new page is still in the process of loading? The document.location.href property still displays the current location (understandably) not the...
3
by: glevik | last post by:
Hello, Anyone that can think of a way to programmaticaly determine the word on an HTML page that the user clicked on will be my hero for life. Leo
6
by: Tom Braun | last post by:
Hello! My first post here... I need to monitor if someone clicked on some (any) link in a subframe. Due to certain restrictions, the only place I can put some JavaScript is in the main...
7
by: who be dat? | last post by:
I need some help here. I'm creating a list on a page where the list is created from a dataset with two tables linked with a datarelation. The first table is a list of groups while the second...
1
by: larry mckay | last post by:
hi, thanks for your help in advance i've embedded internet explorer in a vb.net application and can navigate to a page using webrowser1.navigate myurl the webrowser control is actually being...
3
by: Learner | last post by:
Hello, I have two buttons on one of my VehicleDetails.aspx page. Obiviously these two buttons takes the user to two different pages. Now my client is interested in having a linkbutton instead of...
3
by: rn5a | last post by:
Consider the following code which creates LinkButtons dynamically: For i = 1 to 5 lnkBut = New LinkButton lnkBut.ID = "lnkBut" & i lnkBut.Text = i.ToString & " " lnkBut.CommandName = i...
9
by: GloStix | last post by:
Okay, when I click the link it dissapears and makes a white space underneath it but the space is clickable. so when you click the space, the link actually works Used Firefox 3.0 RC2 for this. OS X...
9
by: newbiegalore | last post by:
Hello everyone :-) , Thanks to the gentle people on this group for helping me out with previous issues. :-D This time round I am facing what I perceive as a simple problem, which I have not found...
2
tjc0ol
by: tjc0ol | last post by:
Hi guys, I have here a javascript code that is capable of changing one background image when link is clicked, it goes: <script type="text/javascript" language="javascript"> var bgImg = new...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.