rawky1976 Posted January 24, 2007 Share Posted January 24, 2007 Hello allI have a Dreamweaver table setup as a repeating region that displays the results of a search (a search that you all helped me with last night!!!). Each cell shows elements of a record, and the first cell shows the field name document_name. I would like this to display as a link to the actual document.All the documents are stored in the same folder Wwwroot\<sitename>\uploads. So I assume I can add this path as some kind of prefix to the href property and then add some fancy php code to add the actual document name and this format will continue throughout the repeating region for every record returned?Thanks, Mark Link to comment https://forums.phpfreaks.com/topic/35573-making-a-dynamic-table-element-display-as-a-link/ Share on other sites More sharing options...
craygo Posted January 24, 2007 Share Posted January 24, 2007 post your code for the loop. Link to comment https://forums.phpfreaks.com/topic/35573-making-a-dynamic-table-element-display-as-a-link/#findComment-168434 Share on other sites More sharing options...
rawky1976 Posted January 24, 2007 Author Share Posted January 24, 2007 Ok, I've got: -<td colspan="3"><h4><span class="style1">Document Name:</span><br /><a href="http://localhost/uploadtest/uploads/"><?php echo $row_rs_searchResults['document_name']; ?></a></h4></td>I actually just added the link bit since you requested the code and thought "that's it, how obvious!" but when I tested I got: -The website declined to show this webpage HTTP 403 Most likely causes:This website requires you to log in. What you can try: Obviously I am logged in!? Link to comment https://forums.phpfreaks.com/topic/35573-making-a-dynamic-table-element-display-as-a-link/#findComment-168446 Share on other sites More sharing options...
craygo Posted January 24, 2007 Share Posted January 24, 2007 [code]<?phpecho "<a href='uploads/".$row_rs_searchResults['document_name']."'>".$row_rs_searchResults['document_name']."</a>";?>[/code] Link to comment https://forums.phpfreaks.com/topic/35573-making-a-dynamic-table-element-display-as-a-link/#findComment-168454 Share on other sites More sharing options...
rawky1976 Posted January 24, 2007 Author Share Posted January 24, 2007 OK, I'm impressed, that was a quick fix!But since adding it my restrict access to page function ceased to work. Each time I 'previewed in browser' it made me login (which is what I want).Now it just opens the page. I'll look into and get back to you if I need to.Thanks, Mark Link to comment https://forums.phpfreaks.com/topic/35573-making-a-dynamic-table-element-display-as-a-link/#findComment-168461 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.