Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP WITH PRINTING DB CONTENTS

Status
Not open for further replies.

liquidtrax

Programmer
Feb 13, 2005
8
GB
I am reading a field from my database using the code

print "<td>".stripslashes ( $a_row['nickname']) ." </td>";

I want to make it so if it prints "DAVE" it is a hyperlink to profile.php?name=dave

is the hyperlink code something like below??

<a href="profile.php?name=<? echo $nickname ?>">

I am looking for someone to combine these codes (or edit it) and make it so what ever the database prints, it is made into a hyperlink

All help is greatly appreciated
 
Code:
print "<td><a href="profile.php?name=".stripslashes ( $a_row['nickname']) .">".stripslashes ( $a_row['nickname']) . "</a></td>";




Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
that code gives the below error


Parse error: parse error, unexpected T_STRING in /home/liquidt/public_html/roster2.php on line 82
 
print "<td><a href="profile.php?name=\"".stripslashes ( $a_row['nickname']) ."\">".stripslashes ( $a_row['nickname']) . "</a></td>";



Bastien

I wish my computer would do what I want it to do,
instead of what I tell it to do...
 
the quotes weren't matching
Code:
print "<td><a href='profile.php?name=" . 
stripslashes ($a_row['nickname']). "'>".stripslashes ( $a_row['nickname']) . "</a></td>";
[/code/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top