Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 03-16-2008, 03:26 PM   #1
usual suspect
 
hobey19's Avatar
 
Join Date: Jun 2002
Location: not here
Posts: 2,051
add url to sql query column

i have a database of computers that i have run everest reports on. these everest reports are in .htm format. i am creating a page to view the quick specs, and i would like each row to have a link to the report file. the code i have is this:



PHP Code:

while($row=mysql_fetch_array($result)){
    echo 
"<tr>";
    echo 
"<td>" $row['comp_name'] . "</td>";
    echo 
"<td>" $row['op_sys'] . "</td>";
    echo 
"<td>" $row['op_sys_sp'] . "</td>";
    echo 
"<td>" $row['comp_model'] . "</td>";
    echo 
"<td>" $row['cpu_type'] . "</td>";
    echo 
"<td>" $row['cpu_clock'] . "</td>";
    echo 
"<td>" $row['memory'] . "</td>";
    echo 
"<td>" $row['hard_drive_size'] . "</td>";
    echo 
"<td>" $row['ip_address'] . "</td>";
    echo 
"<td>" $row['optical_drive1'] . "</td>";
    echo 
"<td>" $row['optical_drive2'] . "</td>";
    echo 
"<td>" $row['anti_virus'] . "</td>";
    echo 
"<td>" $row['room_num'] . "</td>";
    echo 
"<td>" $row['report_link'] . "</td>";
    echo 
"</tr>";
}
echo 
"</table>"

what i want is to have it be something like this for report_link(sorry, don't know the structure, hopefully you understand what i am saying):

PHP Code:
<a href="http://domain/com/report/report_link.htm>View Complete Report</a> 
where report_link is the entry in the report_link field. there is no htm in the report_link field, only the name of the file (ie id18000)

any help would be appreciated. if i am not explaining this well enough, let me know

craig
__________________
the universe is against this current wave of success i'm having. -johnny drama, entourage

Last edited by hobey19; 03-16-2008 at 03:35 PM.
hobey19 is offline   Reply With Quote
Old 03-16-2008, 08:55 PM   #2
Barefoot on the Moon!
Staff
Premium Member
 
Force Flow's Avatar
 
Join Date: Aug 2002
Location: Northeastern USA
Posts: 13,385
I might be reading this too quickly or not quite understanding what you're looking for, but try looking at a PHP get.

http://mydomain.com/report/report_link.php?myid=18000

PHP Code:
$theidwanted $_GET["myid"]; 
__________________
There are two secrets to staying young, being happy, and achieving success. You have to laugh and find humor every day, and you have to have a dream.
Force Flow is offline   Reply With Quote
Old 03-16-2008, 09:49 PM   #3
usual suspect
 
hobey19's Avatar
 
Join Date: Jun 2002
Location: not here
Posts: 2,051
my buddy figured it out for me. the code he used:

PHP Code:
echo "<td>" "<a href=\"http://www.xucraig.com/redwood/reports/" $row['report_link'] . ".htm\"" "> 
View Report - " 
$row['report_link'] . "</a>" "</td>"

thanks Force. i am slowly trying to learn this stuff, so this small project is helping a lot.

craig
hobey19 is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Computer Acronyms Floppyman Computer Hardware 156 06-18-2006 06:25 AM
IExplorer URL History\cache Query dOBsON Internet, Web Applications, & The Cloud 11 06-16-2005 04:18 PM
SQL - complicated query M.D. Web Design / Development 2 10-11-2004 08:57 AM
wifi wondersquare Networking & Online Security 3 07-20-2004 03:28 PM
Heres some Window Secrets Citron Windows Tips, Tricks, and Tweaks 22 01-12-2003 07:07 AM


All times are GMT -5. The time now is 07:35 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2