# This is the line I am using…
# echo “<td><a href=" . $row[’venues/venue_a/venue_a.php’] . “>” . $row[’club_id’] . “</a></td>”;
$row[’venues/venue_a/venue_a.php’] appears to have the link value as the array key instead of the valid array key - something like $row[’venues_link’].
The reason the 'first half' of the url is showing is - if you leave the href empty it defaults to your current page. So, if you're on example.com/mysite.php and click a link with an empty href it will take you to the page you're on.
Hope that helps!
Shawn
Last Wiki Answer Submitted: June 20, 2008 12:41 pm by Shawngo25 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
What does the table look like that you’re querying? Does it have a ‘venue/venue_a/venue_a.php’ column? Thats what it appears is happening in your version. But it seems like you have a column in the database to reference that venue. In that case, you would use $row[$column_name] where $column_name is (and stop me if you need no further explanation ), the the column in your db that represents the venue URL reference for this particular venue.
Hope I confused things a bit more here. Job security?
This is the line I am using…
echo “<td><a href=” . $row['venues/venue_a/venue_a.php'] . “>” . $row['club_id'] . “</a></td>”;
It shows in the table, but the link goes to the “first half” of the web page URL , what I placed in the code is the “2nd half” of the URL.
Any help would be appreciated.
Thank you for your help Shawn, however, I’m still confused!
if you just want the URL in there, remove the $row[''] part from the href.
echo ‘<td><a href=”venues/venue_a/venue_a.php“>’ . $row[’club_id’] . ‘</a></td>’;
and if you’re picking up the query string at venue_a.php you could do something like
echo ‘<td><a href=”venues/venue_a/venue_a.php?club_id= . $row[’club_id’] . ‘“>’ . $row[’club_name’] . ‘</a></td>’;
What does the table look like that you’re querying? Does it have a ‘venue/venue_a/venue_a.php’ column? Thats what it appears is happening in your version. But it seems like you have a column in the database to reference that venue. In that case, you would use $row[$column_name] where $column_name is (and stop me if you need no further explanation
), the the column in your db that represents the venue URL reference for this particular venue.
Hope I confused things a bit more here. Job security?
Cheers,
Shawn
Thank you….I modified it a bit, but it works perfectly!
echo “<td><a href=’venues/venue_a/venue_b.php’>” . $row['club_name'] . “</a></td>”;
Thank you!